home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


getpwnam

getpwnam 
name

Retrieves the passwd file entry of a user, name . The return value in list context is:

($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell)
If you want to do this repeatedly, consider caching the data in a hash using getpwent .

In scalar context, getpwnam returns only the numeric user ID.


Previous: Reference: getpwent Perl in a Nutshell Next: Reference: getpwuid
Reference: getpwent Book Index Reference: getpwuid

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.