Add User Script

Adam Ellis AdamE at AccelGrp.com
Mon Oct 22 13:07:07 GMT 2001


> sh test.sh useradd: invalid user name `dccut ' useradd: invalid user name
`dclam ' useradd: invalid user name `dcprep ' useradd: invalid user name
`dcshp ' 
^^^^^^^^^^^^^^^^^^^^^^^^

Revised, this is command runs in the terminal:

> sh test.sh
'seradd: invalid user name `dccut
'seradd: invalid user name `dclam 
'seradd: invalid user name `dcprep 
'seradd: invalid user name `dcshp 


-----Original Message-----
From: Adam Ellis [mailto:AdamE at AccelGrp.com]
Sent: Monday, October 22, 2001 3:35 PM
To: 'samba at lists.samba.org'
Subject: Add User Script


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

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba




More information about the samba mailing list