|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Solved. Please Delete
Solved. Please Delete
Last edited by badpurpose : October 20th, 2009 at 08:05 PM. Reason: Solved |
|
#2
|
|||
|
|||
|
You probably do not want to add users with uids less than 100, they tend to be used for 'system/special' users.
With that in mind (not tested!): Code:
groupadd -g 2222 bwtusers
uidbase=1000
i=1
while [ $i -le 400 ]
do
newuid=$(( uidbase + i ))
newuser="bwt${i}"
useradd -u ${newuid} -g bwtusers -d /home/${newuser} -m -s /bin/bash ${newuser}
i+$(( i + 1 ))
done
You'd only need to to the groupadd the once, so if the group exists already you can drop that line.
__________________
"I feel so miserable without you; it's almost like having you here" - Stephen Bishop |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Linux Scripting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|