getpwnam

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">
doc_ruby_on_rails
2015-04-05 12:29:49
Comments
Leave a Comment

Please login to continue.