[OS X TeX] Re: users and groups on Leopard

Bruno Voisin bvoisin at mac.com
Tue Mar 11 20:06:13 CET 2008


Le 11 mars 08 à 19:50, Alan Litchfield a écrit :

> On 11/03/2008, at 9:32 PM, Bruno Voisin wrote:
>
>> Le 11 mars 08 à 02:56, Alan Litchfield a écrit :
>>
>>> I missed the original query from Bruno, but to view all the users  
>>> on a unix system, type into a Terminal:
>>>
>>> > cat /etc/passwd
>>>
>>> You can use the `cut` command to only see one field from the  
>>> password file.
>>>
>>> For example, to just see the Unix user names, use the command:
>>>
>>> > cat /etc/passwd | cut -d: -f1
>>>
>>> To find out more about cut read its man pages.
>>
>> With Leopard the above doesn't seem to apply anymore. If you open / 
>> etc/passwd you'll see that it begins with
>
> I use Leopard and it works fine for me. You are typing this on the  
> command line aren't you?
>
> Perhaps you need to sudo?

Hi Alan,

My point was not that I can't read /etc/passwd (I had opened it in  
TextEdit from the Finder, after using Cmd-Shift-G to visualize /etc),  
but that it doesn't seem to provide all the user info. For example, my  
own user account isn't mentioned in it.

According to the comment at the top of the file, it's read only when  
booting in single-user mode, and not otherwise. I imagine the default  
"directory service" /Local/Default is based on /etc/passwd, but adds  
info from other sources to it.

Bruno


More information about the macostex-archives mailing list