Я сделал этот скрипт, чтобы проверить, надеюсь, это поможет кому-то еще:
#!/bin/sh
###############################################################################
# Script Name: aix_chk_user_expires.sh
#
# Author: Chris Alderson
#
# Purpose: Check when a user expires in AIX
#
# NOTES: Please change the value of $oozer to the id you desire to check against
#
##############################################################################
# Set value to specify a user
oozer='<username>'
#get epoch time for the time since last updated
time_since_last_update_in_epoch=$(lssec -f /etc/security/passwd -s $oozer -a lastupdate | cut -d= -f2)
#get the max age number of weeks from luser
max_age=$(lsuser -f $oozer | grep maxage | cut -d= -f2)
#multiply maxage by 7 to get number of days password will last
max_age_in_days=$(echo $((( max_age * 7 ))))
# multiply number of days by how many seconds in a day to get total seconds until change
# We will use this later to add to $time_since_last_update_in_epoch
max_age_in_epoch=$(echo $((( $max_age_in_days * 86400 ))) )
# Create new variable to store the total of max age in seconds and epoch of updated password
time_until_expires_in_epoch=$(echo $((( $max_age_in_epoch + $time_since_last_update_in_epoch ))))
#take epoch times and pass them to perl to give them a readible format
time_last_updated=$(perl -le 'print scalar localtime $ARGV[0]' ${time_since_last_update_in_epoch})
if [[ $max_age -eq 0 ]]; then
time_of_expiration=$(echo "non-expiring password")
else
##take epoch times and pass them to perl to give them a readible format
time_of_expiration=$(perl -le 'print scalar localtime $ARGV[0]' ${time_until_expires_in_epoch})
fi
echo "${oozer}'s password last updated: $time_last_updated"
echo "${oozer}'s password will expire: $time_of_expiration"
Вывод выглядит следующим образом:
user's password last updated: Mon Jul 31 17:00:13 2017
user's password will expire: Mon Oct 23 17:00:13 2017
переместить ~/.config/transmission
на внешний диск.
создать символическую ссылку в новой системе, указывающую на внешний диск.
имейте в виду, что если вы отключите диск, Transmission будет работать некорректно (его каталог конфигурации будет указывать на несуществующее -место без доступа для записи ).