Mailinglist Archive: opensuse-edu (72 mails)
| < Previous | Next > |
Re: [suse-linux-uk-schools] addins users to groups....... 500+
- From: Thomas Adam <thomas_adam16@xxxxxxxxx>
- Date: Fri, 1 Aug 2003 10:43:01 +0000 (UTC)
- Message-id: <20030801104253.61959.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
--- Thomas Adam <thomas_adam16@xxxxxxxxx> wrote: > --- Andrew Nix
<andrew.nix@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote: > I
> need to add 500+ user to a group. Does anyone know how I can this
> > without adding each person individually? As I think I might be sat in
> > this
> > seat for the next two weeks adding everyone and miss my holiday to
> > Ibiza!
> > Cheers
>
> You can do something like this:
>
> for i in $(cat /etc/passwd | awk -F: '{print $1}'); do chown
> $i.GROUPNAME;
> done
Actually, you don't do that! It won't work....
for i in $(cat /etc/passwd | awk -F: '{print $1}'); do adduser $i
GROUPNAME; done
The above will work!!!
Sorry, Andrew,
-- Thomas Adam
=====
Thomas Adam
"The Linux Weekend Mechanic" -- www.linuxgazette.com
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
<andrew.nix@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote: > I
> need to add 500+ user to a group. Does anyone know how I can this
> > without adding each person individually? As I think I might be sat in
> > this
> > seat for the next two weeks adding everyone and miss my holiday to
> > Ibiza!
> > Cheers
>
> You can do something like this:
>
> for i in $(cat /etc/passwd | awk -F: '{print $1}'); do chown
> $i.GROUPNAME;
> done
Actually, you don't do that! It won't work....
for i in $(cat /etc/passwd | awk -F: '{print $1}'); do adduser $i
GROUPNAME; done
The above will work!!!
Sorry, Andrew,
-- Thomas Adam
=====
Thomas Adam
"The Linux Weekend Mechanic" -- www.linuxgazette.com
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
| < Previous | Next > |