All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.realm.UNIXRealm

java.lang.Object
   |
   +----sun.server.realm.Realm
           |
           +----sun.server.realm.UNIXRealm

public final class UNIXRealm
extends Realm
This class provides a simple implementation of a realm based on native UNIX (POSIX) notions of users and groups. When run on systems which don't support those notions, the UNIX realm will not be available. Also, note that many platform-specific features (such as shadow passwords and account creation/modification) are not currently accessible through this class.


Method Index

 o deleteGroup(String)
 o deleteUser(String)
Not portably implementable.
 o getDefaultAclOwner()
Returns the principal which will by default own all ACLs in this realm.
 o getGroup(String)
 o getGroupNames()
Returns names of all the groups in this particular realm.
 o getUser(String)
Returns the information recorded about a particular named user.
 o getUserNames()
Returns names of all the users in this particular realm.
 o init(Properties)
Initializes the UNIX realm by ensuring that the right native code support is available, and that it knows the directory where it should store its ACLs.
 o makeGroup(String)
Returns a newly created empty group, with the name which is given as a parameter.

Methods

 o init
 protected void init(Properties props) throws NoSuchRealmException, BadRealmException
Initializes the UNIX realm by ensuring that the right native code support is available, and that it knows the directory where it should store its ACLs.

Parameters:
props - initialization parameters used by this realm.
Throws: BadRealmException
if the configuration parameters identify a corrupt realm
Throws: NoSuchRealmException
if the configuration parameters specify a realm which doesn't exist
Overrides:
init in class Realm
 o getUserNames
 public Enumeration getUserNames()
Returns names of all the users in this particular realm.

Returns:
enumeration of user names
Overrides:
getUserNames in class Realm
 o getUser
 public User getUser(String name) throws NoSuchUserException
Returns the information recorded about a particular named user.

Parameters:
name - name of the user whose information is desired
Returns:
object describing that user
Throws: NoSuchUserException
if the user is not recognized
Overrides:
getUser in class Realm
 o deleteUser
 public void deleteUser(String user) throws InUseException
Not portably implementable. Deletes a user account from the native operating system.

Parameters:
user - the name of the account to be deleted
Throws: InUseException
always
Overrides:
deleteUser in class Realm
 o getDefaultAclOwner
 public Principal getDefaultAclOwner() throws BadRealmException
Returns the principal which will by default own all ACLs in this realm.

Returns:
the "root" principal
Throws: BadRealmException
if there is no such principal
Overrides:
getDefaultAclOwner in class Realm
 o getGroupNames
 public Enumeration getGroupNames()
Returns names of all the groups in this particular realm.

Overrides:
getGroupNames in class Realm
 o getGroup
 public Group getGroup(String groupName) throws NoSuchGroupException
Throws: NoSuchGroupException
always
Overrides:
getGroup in class Realm
 o makeGroup
 public Group makeGroup(String groupName)
Returns a newly created empty group, with the name which is given as a parameter.

Overrides:
makeGroup in class Realm
 o deleteGroup
 public boolean deleteGroup(String groupName) throws NoSuchGroupException
Throws: NoSuchGroupException
always
Overrides:
deleteGroup in class Realm

All Packages  Class Hierarchy  This Package  Previous  Next  Index