Class PasswdUserDatabase

  • All Implemented Interfaces:
    UserDatabase

    public final class PasswdUserDatabase
    extends java.lang.Object
    implements UserDatabase
    Concrete implementation of the UserDatabase interface that processes the /etc/passwd file on a Unix system.
    Author:
    Craig R. McClanahan
    • Constructor Detail

      • PasswdUserDatabase

        public PasswdUserDatabase()
    • Method Detail

      • setUserConfig

        public void setUserConfig​(UserConfig userConfig)
        Description copied from interface: UserDatabase
        Set the UserConfig listener with which we are associated.
        Specified by:
        setUserConfig in interface UserDatabase
        Parameters:
        userConfig - The new UserConfig listener
      • getHome

        public java.lang.String getHome​(java.lang.String user)
        Specified by:
        getHome in interface UserDatabase
        Parameters:
        user - User for which a home directory should be retrieved
        Returns:
        an absolute pathname to the home directory for the specified user.
      • getUsers

        public java.util.Enumeration<java.lang.String> getUsers()
        Specified by:
        getUsers in interface UserDatabase
        Returns:
        an enumeration of the usernames defined on this server.