org.jvnet.libpam
Class UnixUser

java.lang.Object
  extended by org.jvnet.libpam.UnixUser

public final class UnixUser
extends Object

Represents an Unix user. Immutable.

Author:
Kohsuke Kawaguchi

Constructor Summary
UnixUser(String userName)
           
 
Method Summary
static boolean exists(String name)
           
 String getDir()
          Gets the home directory of this user.
 String getGecos()
          Gets the gecos (the real name) of this user.
 int getGID()
          Gets the GID of this user.
 Set<String> getGroups()
          Gets the groups that this user belongs to.
 String getShell()
          Gets the shell of this user.
 int getUID()
          Gets the UID of this user.
 String getUserName()
          Gets the unix account name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnixUser

public UnixUser(String userName)
         throws PAMException
Throws:
PAMException
Method Detail

getUserName

public String getUserName()
Gets the unix account name. Never null.


getUID

public int getUID()
Gets the UID of this user.


getGID

public int getGID()
Gets the GID of this user.


getGecos

public String getGecos()
Gets the gecos (the real name) of this user.


getDir

public String getDir()
Gets the home directory of this user.


getShell

public String getShell()
Gets the shell of this user.


getGroups

public Set<String> getGroups()
Gets the groups that this user belongs to.

Returns:
never null.

exists

public static boolean exists(String name)


Copyright © 2012. All Rights Reserved.