yum -y install pwgen
Сам скрипт:
perl -Mstrict -e 'my @ls = qw/host1 host2 host3 host4 host5 host6/; for my $user (@ls) { $_ = `/usr/bin/pwgen 16 1`; chomp; open my $passwd, "|/usr/bin/passwd --stdin $user" or die "$!"; print {$passwd} "$_\n"; close($passwd); print "$user $_\n" }'
No comments :
Post a Comment
Note: only a member of this blog may post a comment.