Re: User lists

From: Ahsan Khan <ahsank@dont-contact.us>
Date: Thu, 1 Jun 2000 01:59:29 +0500

I have a simple solution,.

egrep ':150:' /etc/passwd |awk -F: '{print $1}' > userlist

:-)

the only bad thing that it will contain the user with the id 150 and i don't
believe so .

With Regards
Ahsan Khan
Sr. System Admin
Internet Division (OneNet)
Sun Communication Pvt. Ltd.
Pakistan
http://www.one.net.pk

----- Original Message -----
From: "John F. Navratil" <navratil@netropolis.net>
To: <squid-users@ircache.net>
Sent: Thursday, June 01, 2000 12:11 AM
Subject: Re: User lists

> One (of many) ways is to grep for the group with
>
> grep ^.*\:.*\:.*\:150: </etc/passwd
>
> then pipe through sed to strip everything from the first ':' on:
>
> | sed 's/\:.*//g'
>
> This will give a list of users with the associated group.
>
> ----- Original Message -----
> From: Gustavo Palacios <gpalacios@petroecuador.com.ec>
> To: Squid Users Mailing List <squid-users@ircache.net>
> Sent: Wednesday, May 31, 2000 1:30 PM
> Subject: User lists
>
>
> > Hi everybody
> > I searching for a cgi or other script that extracts the userid of the
> > passwd file because I need to get a list of users in a special group to
> > give to them access to squid, i put the same group to them.
> > user1:x:455:150:name:/home:/dev/null
> > user2:x:456:150:name:/home:/dev/null
> > I was traing with grep and cat but i can´t get the excat lenght of the
> > uid for each one.
> >
> > Thanks in advance.
> > --
> > +-------------------------------------------------------------------+
> > | Gustavo Palacios (Mr.) <gpalacios@petroecuador.com.ec>
> > | Network Administrator <webmaster@petroecuador.com.ec>
> > | PETROECUADOR
> > | Empresa Estatal Petróleos del Ecuador
> > | P.O. Box 17-11-5007, Quito, Ecuador
> > | Phone: +593 (2) 563060, [Direct: +593 (2) 562502]
> > | Fax: +593 (2) 503571
> > | Cell: +593 (09) 844118
> > | WWW => http://www.petroecuador.com.ec
> > +-------------------------------------------------------------------+
> > K E E P I N G Y O U I N T O U C H W I T H T H E W O R L D
> >
> >
> >
>
>
Received on Wed May 31 2000 - 15:10:58 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:53:40 MST