## org.mortbay.setuid
Class SetUID

    java.lang.Object
      org.mortbay.setuid.SetUID

    public class SetUID

extends Object

Class is for changing user and groupId, it can also be use to retrieve user information by using getpwuid(uid) or getpwnam(username) of both linux and unix systems

Author:
  Greg Wilkins, Leopoldo Lee Agdeppa III

Field Summary
`static int` `ERROR`
`static int` `OK`

Constructor Summary
`SetUID()`

Method Summary
`static Group` `getgrgid(int gid)`
`static Group` `getgrnam(String name)`
`static Passwd` `getpwnam(String name)`
`static Passwd` `getpwuid(int uid)`
`static int` `setgid(int gid)`
`static int` `setuid(int uid)`
`static int` `setumask(int mask)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### OK

    public static final int OK

See Also:
  Constant Field Values

### ERROR

    public static final int ERROR

See Also:
  Constant Field Values

Constructor Detail

### SetUID

    public SetUID()

Method Detail

### setumask

    public static int setumask(int mask)

### setuid

    public static int setuid(int uid)

### setgid

    public static int setgid(int gid)

### getpwnam

    public static Passwd getpwnam(String name)
                           throws SecurityException

  Throws:
    `SecurityException`

### getpwuid

    public static Passwd getpwuid(int uid)
                           throws SecurityException

  Throws:
    `SecurityException`

### getgrnam

    public static Group getgrnam(String name)
                          throws SecurityException

  Throws:
    `SecurityException`

### getgrgid

    public static Group getgrgid(int gid)
                          throws SecurityException

  Throws:
    `SecurityException`

Copyright © 1995-2008 Mort Bay Consulting. All Rights Reserved.