first commit
This commit is contained in:
17
scripts/Loop_AddUser3.sh
Normal file
17
scripts/Loop_AddUser3.sh
Normal file
@ -0,0 +1,17 @@
|
||||
user1,password1
|
||||
user2,password2
|
||||
etc..
|
||||
|
||||
The script:
|
||||
|
||||
for userdetails in `cat /pathto//users.txt`
|
||||
do
|
||||
user=`echo $userdetails | cut -f 1 -d ,`
|
||||
passwd=`echo $userdetails | cut -f 2 -d ,`
|
||||
echo "useradd -d /user1/kopen3 -p `mkpasswd $passwd` $user"
|
||||
done
|
||||
|
||||
run the script and redirect the output to a file, e.g:
|
||||
|
||||
./createusers.sh > userscript.sh
|
||||
chmod +x userscript.sh
|
Reference in New Issue
Block a user