Empulse Group a collection of notes from a sys admin, musician, and father


Here is a small bash script that will create a user from a list that you can pipe it complete with setting and printing a random password. This was for mail users so I set the shell to false.


while read USER; do
   PASS=`< /dev/urandom tr -dc A-Za-z0-9_ | head -c8`
   /usr/sbin/useradd -s /bin/false $USER
   echo $PASS | passwd $USER --stdin
   echo "User: $USER / Pass: $PASS"
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.

Copyright &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;copy; 2018 Empulse Group &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;middot; Powered by WordPress
Lightword Theme by Andrei Luca Go to top &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;uarr;