Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: ellegaarddk on September 03, 2002, 10:23:31 PM
-
I'm chinging users on a yearly basis, so once a year I'll have to remove 100 users and add 100 new ones. So I was really looking forward to try the HOWTO by Darrell May - but it won't work!
I'm a complete newbie in the Xnix-world, so the solution might be very simple - here is the problem:
I've made the adduserlist.txt file, and I've copied the e-smith-adduser.sh to the /root; logged on as root I type .e-smith-adduser.sh and ...
this is what I get:
[root@beta root]# ls
adduser backup_phpws.sql sg-install userlist.txt
adduserlist.txt e-smith-adduser temp
[root@beta root]# .e-smith-adduser
bash: .e-smith-adduser: command not found
I've checked the file, I can't find anything. I'm running E-Smith ver. 5.5
What am I missing? - or what is it that I don't know?
Thanks
-
Try ./e-smith-adduser, making sure you are in the directory where the script is located. And try 'chmod +x e-smith-adduser' for good measure.
Dan
-
Okay, now I get:
[root@beta root]# ./e-smith-adduser.sh
bash: ./e-smith-adduser.sh: bad interpreter: No such file or directory
-
Try this script. From either your e-smith console or ssh terminal (if you use Windows don't have putty.exe, you should), type this:
wget http://www.optimumnetworks.com/files/e-smith-adduser.sh.gz
Once it's downloaded:
gunzip e-smith-adduser.sh.gz
Then:
./e-smith-adduser.sh
Make sure your userlist file is where UFILE=/root/adduserlist.txt says it should be.
Let me know how it works out.
-
....also, you'll want to type:
'chmod +x e-smith-addusers.sh' --- to make it executable.
-
To make it more usefull for me, I changed the script to pull the passwords from the adduserlist.txt file for each user. I did this because I added around 100 users and I needed decent passwords. Got the passwords from:
http://www.winguides.com/security/password.php
-
If I remember right... to run Darrell's script, you had to do ". e-smith-adduser"
That's "dot space e-smith-adduser". Of course, I haven't checked this in a long time. Also, the last time I looked at that script, it created users with random userID's. (The e-smith system typically creates incremental UserID's.)
You might also take a look at this site:
http://www.tech-geeks.org/contrib/loveless/batch_users/
I've made a few modifications, and added a script from Fillippo Carlotti that creates the users with the correct UserID's.
HTH.