From: Mike Hall Date: 2002-04-26T06:56:41+09:00 Subject: Re: User and Group name => user id and group id Sean O'Dell wrote: > This is kind of a trivial question, but I can't find reference for a > function that returns a numeric user id given a user name (under Linux). > I could parse the passwd and group file, but it seems there'd be a built-in > function for it somewhere. The "etc" module is standard; it should have been built on your system. require 'etc' p Etc.getpwnam 'bin' #-> # Documented in Ruby in a Nutshell. Source in .../ext/etc (OT: should the file-system stuff appear under 'Etc'?) -- Mike Hall http://www.enteract.com/~mghall