Richard Lyons <richard@the-place.net> writes: > On Thursday 04 March 2004 02:02, Colin Watson wrote: >> can use 'getent passwd | grep ^whatever-my-user-name-is' to find out if > > I learn something new every hour! Never heard of getent before. (Though in > this instance 'cat /etc/passwd | grep ^whatever-my-user-name-is' is only one > character longer). but getent uses getpwnam(2) to use the real passwd info, wherever that may be. It's not always /etc/passwd -- for example, look at NIS or LDAP. getent still works in those cases, whereas grepping /etc/passwd probably doesn't. good times, Vineet
Attachment:
pgpdg_Ox3OkYv.pgp
Description: PGP signature