End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Process::UID.from_name
Process::UID.from_name(name) → uid
process.c
View on GitHub ↗
static VALUE
p_uid_from_name(VALUE self, VALUE id)
{
return UIDT2NUM(OBJ2UID(id));
}
Get the user ID by the name. If the user is not found, ArgumentError will be raised.
Example
Process::UID.from_name("root") #=> 0 Process::UID.from_name("nosuchuser") #=> can't find user for nosuchuser (ArgumentError)
See also
.eid
.grant_privilege
.change_privilege
.re_exchange
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1