KRB5-SYNC-BACKEND(8)
π KRB5-SYNC-BACKEND π
okay bestie, gather round, because this is krb5-sync-backend, section 8 of the manual (the sysadmin-y section, the one where the real ones live β¨). It's part of the krb5-sync family, and it is literally the queue manager for your Kerberos password drama. Let's get into it.
β¨ NAME β¨
krb5-sync-backend β Manipulate Kerberos password and status change queue
β¨ SYNOPSIS β¨
krb5-sync-backend (help|manual)
krb5-sync-backend (disable|enable) [-d queue] user
krb5-sync-backend list [-d queue]
krb5-sync-backend process [-s] [-d queue]
krb5-sync-backend password [-d queue] user ad < password
krb5-sync-backend purge [-d queue] days
β¨ DESCRIPTION β¨
So here's the tea π«: krb5-sync-backend is your front door to the queue of pending password and account status changes. Who writes to that queue? Either this very utility, or the synchronization plugin β whenever it hits a failure and has to leave the change sitting there like an unread text. π
What can it actually do for you? It can queue account enables, disables, or password changes for Active Directory, it can list the queued actions, or it can process the queued actions with krb5-sync (telling it to take its action from a file, which is very "here's the assignment, go do it" of it π
).
The queue directory is gonna contain files named like this:
<username>-<domain>-<action>-<timestamp>-<count>
and let me break that down because it's lowkey a whole naming scheme:
<username>is the name of the affected account β heads up,"/"gets replaced with"."in the file name, and the realm gets removed entirely, no cap.<domain>is"ad".<action>is either"enable"(which is used for both enabling and disabling accounts, iconic of it) or"password".<timestamp>is a ISO 8601 timestamp in UTC.<count>is a two-digit zero-padded number between0and99β that's so we can handle multiple changes that arrive in the same second. because of course they arrive in the same second. π
Every one of those files contains a queued change in the format described in krb5-sync(8).
Now, the supported arguments to krb5-sync-backend are:
disable userβ Queue a disable action (in Active Directory, because that's the only system currently supported for enable and disable) for user.enable userβ Queue an enable action (in Active Directory, because that's the only system currently supported for enable and disable) for user.helpβ List the supported commands.listβ List the current contents of the queue.manualβ Display this documentation. (hi, that's me, you're reading it π)processβ Process the queue. All queued actions get sorted alphanumerically, which β because of the timestamp β means all changes for a particular user of a particular type get done in the order they were queued. So polite. β¨krb5-syncgets called for each queued action, as long as it keeps succeeding. But if it fails for one queued action, then all other actions sharing the same username, domain, and action get skipped, and queue processing just moves on to the next action that differs in one of those three parameters. no biggie, moving on. πpassword user ad < passwordβ Queue a password change for user in Active Directory, setting their password to password. By default, password is read from standard input. It can also be passed as a command-line argument, but that's less secure, because the password is then readable by anyone on the system who can see the command-line arguments of processes. (bestie. don't. π)
Also very important: the entire standard input is taken as the password, including any trailing newlines, so be careful how the password is provided. If you're using something like echo, use "echo -n" or the "\c" flag, depending on your system. π«Ά
purge daysβ Delete all queued actions last modified longer than days days ago. This can be used to clean up old failed change propagations in situations where accounts may be created or have password changes queued that are later removed and never created in other environments. spring cleaning but for authentication, slay. π§
β¨ OPTIONS β¨
Quick rule before we dive in: options must be specified after the command. Order matters, bestie, don't fight it.
-d queue,--directory=queueβ Use queue as the queue directory instead of the default of/var/spool/krb5-sync. This also changes the lock file accordingly. This option is supported for all commands except"help"and"manual".-s,--silentβ This option is only allowed for the"process"command. It filters out the output ofkrb5-syncto ignore common errors and success messages, and only show uncommon errors. It'll filter out all output whenkrb5-syncis successful, and it'll filter out error messages that normally indicate the account is missing in Active Directory. The regexes can be modified at the start of this script. π
β¨ FILES β¨
/usr/sbin/krb5-syncβ The path to thekrb5-syncutility. This may be changed at the top of this script./var/spool/krb5-syncβ The default path to the queue. This must match thequeue_dirparameter inkrb5.confused by the plugin. It can be changed at the top of this script./var/spool/krb5-sync/.lockβ An empty file used for locking the queue. When writing to or querying the queue,krb5-sync-backendwill open and lock this file with the Perlflockfunction, which normally callsflock(2). Any other queue writers need to use the same locking mechanism for safe operation. (share the lock, don't be a menace π)
β¨ AUTHOR β¨
Russ Allbery <eagle@eyrie.org> β the icon, the legend π
β¨ COPYRIGHT AND LICENSE β¨
Copyright 2007, 2008, 2010, 2012, 2013 The Board of Trustees of the Leland Stanford Junior University
okay here comes the legal bit, and it's giving very official, so I'm leaving it word-for-word because that's the whole point of a license πΈ:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
β¨ SEE ALSO β¨
The current version of this program is available from its web page at <http://www.eyrie.org/~eagle/software/krb5-sync/>.
and that's the whole page, bestie π¦ this was krb5-sync-backend, version 3.1, dated 2015-08-19. go forth and process your queue responsibly πβ¨π
π¦ where this page comes from
- debian bookworm: krb5-sync-tools 3.1-3+b1 Β· MIT
- debian trixie: krb5-sync-tools 3.1-3+b3 Β· MIT
- ubuntu jammy: krb5-sync-tools 3.1-3 Β· MIT
- ubuntu noble: krb5-sync-tools 3.1-3build1 Β· MIT
- ubuntu questing: krb5-sync-tools 3.1-3build1
- ubuntu resolute: krb5-sync-tools 3.1-3build2 Β· MIT
- ubuntu stonking: krb5-sync-tools 3.1-4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms