Add User Script
Adam Ellis
AdamE at AccelGrp.com
Mon Oct 22 12:34:06 GMT 2001
I am trying to read in a list of users from a file and automatically create
users from that. Here is what I thought would work:
#!/bin/sh
cat /mnt/PDC1-UsrSync/user.diff | while read Foo; do useradd $Foo; done
Contents of the user.diff file:
dccut
dclam
dcprep
dcshp
But here is what I get when I run the script:
> sh test.sh useradd: invalid user name `dccut ' useradd: invalid user name
`dclam ' useradd: invalid user name `dcprep ' useradd: invalid user name
`dcshp '
Any ideas? Thanks,
AE
More information about the samba
mailing list