method
getpwnam
v1_9_2_180 -
Show latest stable
- Class:
Etc
getpwnam(p1)public
Returns the /etc/passwd information for the user with specified login name.
The information is returned as a Struct::Passwd; see getpwent above for details.
e.g. * Etc.getpwnam(‘root’) -> #<struct Struct::Passwd name=“root”, passwd=“x”, uid=0, gid=0, gecos=“root”,dir=“/root”, shell=“/bin/bash”>