Re: User lists

From: Colin Campbell <[email protected]>
Date: Thu, 1 Jun 2000 09:07:03 +1000 (EST)

On Wed, 31 May 2000, Gustavo Palacios wrote:

> 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.

Just to prove there are 1000 ways to do anything:

cut -d: -f1,4 /etc/passwd | grep :150 | cut -f1 -d:
# get userid:gid get gid = 150 give me userid

Colin
Received on Wed May 31 2000 - 17:11:11 MDT

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