[PLUG] Re: Listing Linux Users

Robby Russell robby at planetargon.com
Mon Apr 7 10:38:01 UTC 2003


<?echo Carla Schroder managed to take the time to type out the following:

> On Sunday 06 April 2003 6:03 pm, Cooper Stevenson wrote:
>> This assumes that the user has a directory in /home but you can adapt
>> this command to suit your environment:
>>
>>   cat /etc/passwd | grep /home | awk -F : '{ print $1 }'
>>
>>
>> Cooper Stevenson
>> MWVLUG Coordinator
>> Em: cooper at cooper.stevenson.name
>> Www: http://www.mwvlug.org
>
> Or what about selection by UID_MIN?  On my system, the human accounts are
> >=
> 1000. I haven't been able to make it work, though... yet...
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> Carla Schroder
> www.tuxcomputing.com
> this message brought to you
> by Libranet 2.7 and Kmail
> ~~~~~~~~~~~~~~~~~~~~~~~~~
>

I have a simple script in my cron to get add all the users on my system to
a file that postfix uses for an alias. In my case, the UIDs are 500+


#/bin/sh
/usr/bin/awk -F: '$3 > 500 { print $1 }' /etc/passwd > /etc/mail/allusers



-- 
                 .-.
          ,o8888o, |
        ,888888888/,
        88G33K888/88
        8888888/'888
        `8888/'8888'   http://PlanetArgon.com
        ( `,'888P'
        `-'

Robby Russell
Planet Argon
1212 SE 39th AVE - PORTLAND OR 97214
503.351.4730
robby at planetargon.com





More information about the PLUG mailing list