Computing.Net > Forums > Unix > creation of 1000 users

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

creation of 1000 users

Reply to Message Icon

Name: coolchecks
Date: January 14, 2002 at 23:28:46 Pacific
Comment:

can any one tell me (script ) as to create an normal unix users of fixed group with names starting like user1 (to user2 user3 user 4 ......) with one script???
pls help me..



Sponsored Link
Ads by Google

Response Number 1
Name: James Boothe
Date: January 15, 2002 at 06:30:31 Pacific
Reply:

Create the following script as usergen.sh and tweek the useradd syntax with desired options such as desired group, shell etc. The script will create useradd.sh which you can then run.

#!/usr/bin/ksh
exec > useradd.sh
k=0
while [ $k -lt 1000 ]
do
((k=k+1))
echo "useradd -g users -s /bin/ksh user$k"
done


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: creation of 1000 users

Display one record of a user www.computing.net/answers/unix/display-one-record-of-a-user/5552.html

Cron jobs of other users www.computing.net/answers/unix/cron-jobs-of-other-users/6557.html

To limit the UNIX commands of a user www.computing.net/answers/unix/to-limit-the-unix-commands-of-a-user/3483.html