|
If you want to create multiple users under Linux and do not want to manually set up one by one, you can use the following script to build!
#! / Bin / bash
#
for NUM in {1..9}; do
user = user $ NUM
useradd $ user
#userdel $ user echo RedHat | passwd --stdin $ user
done
Explanation:
for NUM in {1..9}; do sentence means from between 1-9 to select a number, because this script is used to establish a continuous user, user1, user2 .... user9.
useradd $ user phrase is a continuous increase in users
echo redhat | passwd --stdin $ user to add the phrase means the same for this continuous user password is redhat
If you want to delete a user can use the userdel command! |
|
|
|