PasswdUserDatabase (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.startup, class: PasswdUserDatabase

# Class PasswdUserDatabase

java.lang.Object
org.apache.catalina.startup.PasswdUserDatabase

All Implemented Interfaces:
  `UserDatabase`

public final class PasswdUserDatabase extends Object implements UserDatabase
Concrete implementation of the `UserDatabase` interface that processes the `/etc/passwd` file on a Unix system.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PasswdUserDatabase()`
  Construct a new `PasswdUserDatabase` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getHome(String user)`
  Return an absolute pathname to the home directory for the specified user.
  `UserConfig`
  `getUserConfig()`
  Return the UserConfig listener with which we are associated.
  `Enumeration<String>`
  `getUsers()`
  Return an enumeration of the usernames defined on this server.
  `void`
  `setUserConfig(UserConfig userConfig)`
  Set the UserConfig listener with which this UserDatabase is associated.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PasswdUserDatabase

    public PasswdUserDatabase()
    Construct a new `PasswdUserDatabase` instance.

- ## Method Details

  - ### getUserConfig

    public UserConfig getUserConfig()
    Description copied from interface: `UserDatabase`
    Return the UserConfig listener with which we are associated.
    Specified by:
      `getUserConfig` in interface `UserDatabase`
    Returns:
      the UserConfig listener

  - ### setUserConfig

    public void setUserConfig(UserConfig userConfig)
    Description copied from interface: `UserDatabase`
    Set the UserConfig listener with which this UserDatabase is associated.
    Specified by:
      `setUserConfig` in interface `UserDatabase`
    Parameters:
      `userConfig` - The new UserConfig listener

  - ### getHome

    public String getHome(String user)
    Description copied from interface: `UserDatabase`
    Return an absolute pathname to the home directory for the specified user.
    Specified by:
      `getHome` in interface `UserDatabase`
    Parameters:
      `user` - User for which a home directory should be retrieved
    Returns:
      the home directory path

  - ### getUsers

    public Enumeration<String> getUsers()
    Description copied from interface: `UserDatabase`
    Return an enumeration of the usernames defined on this server.
    Specified by:
      `getUsers` in interface `UserDatabase`
    Returns:
      the enumeration of usernames