[Gambas-user] getting a list of users

Brian Snipes bsnipes at ...21...
Sat Nov 27 19:00:55 CET 2004


Jason Curl wrote:

>On most systems, isn't /etc/passwd available for reading? One could iterate
>through this and check that the login shell is actually valid for a valid
>login account.
>
>I'm not sure if the passwd file is always kept in /etc though.
>
>-----Original Message-----
>From: gambas-user-admin at lists.sourceforge.net
>[mailto:gambas-user-admin at lists.sourceforge.net] On Behalf Of Benoit
>Minisini
>Sent: Thursday, 25 November 2004 11:21
>To: gambas-user at lists.sourceforge.net
>Subject: Re: [Gambas-user] getting a list of users
>
>
>On Thursday 25 November 2004 10:53, Technoferret wrote:
>  
>
>>Could anyone help me with what is probably a simple problem.
>>
>>I need to populate a combobox with a list of all the USER names that
>>have a login account on the system but for some reason how I get this
>>list has deserted me.
>>
>>Cheers
>>Dave
>>    
>>
>
>The quick way but not the good way:
>
>MyComboBox.List = Dir("/home").Join("\n") & "\nroot"
>
>  
>
Parsing the output of 'getent passwd' would work for systems that use 
/etc/passwd or external auth backends such as LDAP.

Brian




More information about the User mailing list