カテゴリ:

If you made users, john and paul. You could make passwords automatically with the following commands. If there is no uuencode command, install it with 'yum install sharutils.'

# for user in john: paul:
> do
> echo -n $user
> head -c 6 /dev/random | uuencode -m - | sed -n '2p'
> done > /tmp/password
# cat /tmp/password
john:2S+dJ64l
paul:FwWcC2F0

chpasswd command assign passwords from the file.

# chpasswd < /tmp/password