shell script useradd linux | password | bash




The following script will create upto five users and you will need to provide username and password on prompt. You may change this to N number of users by increasing the values from 5 to N numbers that you wish.

# Shell script to create multiple users
for a in 1 2 3 4 5
echo "Enter the name of the user you wish to create"
read a
/usr/sbin/useradd $a
echo "Enter the password for the user $a"
/usr/bin/passwd $a

Thank you for viewing

Leave a Reply

Your email address will not be published.

* Copy This Password *

* Type Or Paste Password Here *

36,603 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Protected by WP Anti Spam