First off you need semi colons in a for loop like this
for USER in u5 u6 u7 u8; do useradd $USER echo med+21$$5d; passwd --stdin $USER; done
I dont really know what your trying to do here though... What is u5 u6 u7?? Are they files?
If they are files (lets say text files with usernames one line at a time) you need to do something like this:
for USER in `cat u5 u6 u7 u8`; do useradd $USER echo med+21$$5d; passwd --stdin $USER; done
But if they are text files I would combine them into one and run it, so it will actually work.
Like so...
cat u5 >> users
cat u6 >> users
cat u7 >> users
and so on... That will put everything into one file called users.
Main Topics
Browse All Topics





by: TintinPosted on 2009-08-12 at 03:19:20ID: 25077224
missing semi-colons
Select allOpen in new window