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 boolean
comparePassword
(User.Name username, String password) protected boolean
static String
static String
getCronTable
(User.Name username) getEncryptedPassword
(User.Name username) long
static void
Allows manual rebuild without the necessity of running the entire daemon (use carefully, only when main daemon not running).static void
setAutoresponderContent
(PosixPath path, String content, int uid, int gid) static void
setBashProfile
(UserServer lsa, String profile) static void
setCronTable
(User.Name username, String cronTable) static void
setEncryptedPassword
(User.Name username, String encryptedPassword, Integer changedDate) static void
setPassword
(User.Name username, String plainPassword, boolean updateChangedDate) static void
start()
static void
tarHomeDirectory
(StreamableOutput out, User.Name username) static void
untarHomeDirectory
(StreamableInput in, User.Name username) static void
Methods 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:
IOException
SQLException
-
doRebuild
protected boolean doRebuild()- Specified by:
doRebuild
in classBuilderThread
- Returns:
true
if successful orfalse
if unsuccessful and needs to be retried.
-
getAutoresponderContent
- Throws:
IOException
SQLException
-
getCronTable
- Throws:
IOException
-
getEncryptedPassword
public static Tuple2<String,Integer> getEncryptedPassword(User.Name username) throws IOException, SQLException - Throws:
IOException
SQLException
- See Also:
-
setBashProfile
- Throws:
IOException
SQLException
-
setAutoresponderContent
public static void setAutoresponderContent(PosixPath path, String content, int uid, int gid) throws IOException, SQLException - Throws:
IOException
SQLException
-
setCronTable
public static void setCronTable(User.Name username, String cronTable) throws IOException, SQLException - Throws:
IOException
SQLException
-
setEncryptedPassword
public static void setEncryptedPassword(User.Name username, String encryptedPassword, Integer changedDate) throws IOException, SQLException - Throws:
IOException
SQLException
- See Also:
-
setPassword
public static void setPassword(User.Name username, String plainPassword, boolean updateChangedDate) throws IOException, SQLException - Throws:
IOException
SQLException
-
start
- Throws:
IOException
SQLException
-
tarHomeDirectory
public static void tarHomeDirectory(StreamableOutput out, User.Name username) throws IOException, SQLException - Throws:
IOException
SQLException
-
untarHomeDirectory
public static void untarHomeDirectory(StreamableInput in, User.Name username) throws IOException, SQLException - Throws:
IOException
SQLException
-
waitForRebuild
public static void waitForRebuild() -
getProcessTimerDescription
- Specified by:
getProcessTimerDescription
in classBuilderThread
-
getProcessTimerMaximumTime
public long getProcessTimerMaximumTime()- Overrides:
getProcessTimerMaximumTime
in classBuilderThread
-
main
Allows manual rebuild without the necessity of running the entire daemon (use carefully, only when main daemon not running).
-