Class LinuxAccountManager
java.lang.Object
com.aoindustries.aoserv.daemon.util.BuilderThread
com.aoindustries.aoserv.daemon.posix.linux.LinuxAccountManager
- All Implemented Interfaces:
TableListener,PackageManager.PackageListener
TODO: Watch for changes in /etc/passwd and /etc/group and auto-run rebuild.
TODO: This will more promptly add new system users and groups to the master.
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class com.aoindustries.aoserv.daemon.util.BuilderThread
DEFAULT_MAXIMUM_DELAY, DEFAULT_MINIMUM_DELAY, DEFAULT_PROCESS_TIMER_MAXIMUM_TIME, DEFAULT_PROCESS_TIMER_REMINDER_INTERVAL -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancomparePassword(User.Name username, String password) protected booleanstatic Stringstatic StringgetCronTable(User.Name username) getEncryptedPassword(User.Name username) longstatic voidAllows manual rebuild without the necessity of running the entire daemon (use carefully, only when main daemon not running).static voidsetAutoresponderContent(PosixPath path, String content, int uid, int gid) static voidsetBashProfile(UserServer lsa, String profile) static voidsetCronTable(User.Name username, String cronTable) static voidsetEncryptedPassword(User.Name username, String encryptedPassword, Integer changedDate) static voidsetPassword(User.Name username, String plainPassword, boolean updateChangedDate) static voidstart()static voidtarHomeDirectory(StreamableOutput out, User.Name username) static voiduntarHomeDirectory(StreamableInput in, User.Name username) static voidMethods inherited from class com.aoindustries.aoserv.daemon.util.BuilderThread
getMaximumDelay, getMinimumDelay, getProcessTimerReminderInterval, getProcessTimerSubject, getRandomDelay, packageListUpdated, tableUpdated, waitForBuild
-
Method Details
-
comparePassword
public static boolean comparePassword(User.Name username, String password) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
doRebuild
protected boolean doRebuild()- Specified by:
doRebuildin classBuilderThread- Returns:
trueif successful orfalseif unsuccessful and needs to be retried.
-
getAutoresponderContent
- Throws:
IOExceptionSQLException
-
getCronTable
- Throws:
IOException
-
getEncryptedPassword
public static Tuple2<String,Integer> getEncryptedPassword(User.Name username) throws IOException, SQLException - Throws:
IOExceptionSQLException- See Also:
-
setBashProfile
- Throws:
IOExceptionSQLException
-
setAutoresponderContent
public static void setAutoresponderContent(PosixPath path, String content, int uid, int gid) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
setCronTable
public static void setCronTable(User.Name username, String cronTable) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
setEncryptedPassword
public static void setEncryptedPassword(User.Name username, String encryptedPassword, Integer changedDate) throws IOException, SQLException - Throws:
IOExceptionSQLException- See Also:
-
setPassword
public static void setPassword(User.Name username, String plainPassword, boolean updateChangedDate) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
start
- Throws:
IOExceptionSQLException
-
tarHomeDirectory
public static void tarHomeDirectory(StreamableOutput out, User.Name username) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
untarHomeDirectory
public static void untarHomeDirectory(StreamableInput in, User.Name username) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
waitForRebuild
public static void waitForRebuild() -
getProcessTimerDescription
- Specified by:
getProcessTimerDescriptionin classBuilderThread
-
getProcessTimerMaximumTime
public long getProcessTimerMaximumTime()- Overrides:
getProcessTimerMaximumTimein classBuilderThread
-
main
Allows manual rebuild without the necessity of running the entire daemon (use carefully, only when main daemon not running).
-
