getpwnam(name) â Passwd
Class Public methods
Returns the /etc/passwd information for the user with specified login
name.
The information is returned as a Passwd
struct.
See the unix manpage for getpwnam(3) for more detail.
Example:
Etc.getpwnam('root')
#=> #<struct Struct::Passwd name="root", passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">