Re: Simple useradd script problem

2002-09-03 Thread david
John W. Krahn wrote: >> change: >> >> @users = ; >> >> to: >> >> chop(@users = ); > > > You should use chomp unless you are stuck in Perl4. > agree. chomp is safer(and faster than chop). david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: Simple useradd script problem

2002-09-03 Thread John W. Krahn
David wrote: > > Darren Wanner wrote: > > > Simple add user script: > > > > #!/usr/bin/perl > > > > open(FILE,"users.log"); > > @users=; > > foreach $users (@users) { > > `useradd -g 201 -d /userhome/$users -m $users`; > > } > > print "done.\n"; > > change: > > @users = ; > > to: > > chop(@u

Re: Simple useradd script problem

2002-09-03 Thread Dave Arnold
In message <[EMAIL PROTECTED]> Darren Wanner <[EMAIL PROTECTED]> wrote: > > I'm trying to write a simple script that takes a list of users from a file > and creates a user account for them, using the useradd script. The system > I'm doing this on is Solaris 8. When I run the script I

Re: Simple useradd script problem

2002-09-03 Thread John W. Krahn
Darren Wanner wrote: > > I'm trying to write a simple script that takes a list of users from a file > and creates a user account for them, using the useradd script. The system > I'm doing this on is Solaris 8. When I run the script I get the following > error. It seems as if it's not accepting

Re: Simple useradd script problem

2002-09-03 Thread david
Darren Wanner wrote: > Simple add user script: > > #!/usr/bin/perl > > open(FILE,"users.log"); > @users=; > foreach $users (@users) { > `useradd -g 201 -d /userhome/$users -m $users`; > } > print "done.\n"; change: @users = ; to: chop(@users = ); and try again. david -- To unsubscribe,