Курсовая работа: Управление учетными записями пользователей

vecho -n "generating password for $u..."

pass=$(randompass)

echo "$u:$pass" | eval $simulate chpasswd

vecho -n "."

eval $simulate change -M $pass_expire -d 2003-01-01 $u

vecho -n "."

rm -f $u.passwd.txt

echo > $u.passwd.txt "\

------------------------------------------------------------------------------------------------------------------------

Login name: $u

Password: $pass

Please log in and change your password: the system should prompt you to do this when you log in. You can change your password at any time with the 'passwd' command. Choose a strong password - everyday words, birthdays, names of people or animals, all these are too easy to guess.

Also, DO NOT give your password to anyone, ever. The IT staff will never ask you for your password, and neither should anyone else. You will be held responsible for all activity done via your account.

--------------------------------------------------------------------------------------------------------------------------

printf >>$log_file "$(date) %-12s %s\\n" $u $pass

vecho "$pass"

if [ -n "$mass_out" ]: then

uid=$(getent passwd $u | cut -f3 -d:)

echo -e "$u\\t$pass\\t$uid"

processed=$(expr $processed + 1)

done

i f [ $processed -gt 0 ] : then

test -z "$mass_out" &&

echo >&2 "$processed password(s) reset - see $text_file_dir/$log_file"

else

echo >&2 "no users specified - see '$prog -h' for help"

fi


16.Серийная замена паролей

Для серийной смены паролей можно воспользоваться сценарием mass_passwd из раздела 15. Сценарий позволяет задать состав пользователей тремя разными способами:

К-во Просмотров: 592
Бесплатно скачать Курсовая работа: Управление учетными записями пользователей