SYNC-ACCOUNTS-CREATEUSER(8)
β¨ NAME β¨
sync-accounts-createuser β bestie, it's the helper/hook program for sync-accounts π
π SYNOPSIS π
SYNCUSER_CREATE_var=value... sync-accounts-createuser
πΈ DESCRIPTION πΈ
Okay so here's the tea: sync-accounts calls sync-accounts-createuser whenever it's out there creating a local account. That's literally its whole job. π«Ά
It has to do all the tasks that come with local account creation β except for the actual changes to the password, shadow and group databases. Those? Not its problem. Someone else's main character moment.
At the very minimum, it must create the new account's home directory (with appropriate permissions, obviously β we're not animals). The supplied sync-accounts-createuser script does exactly that. No notes. π
It may also suggest to sync-accounts modifications to the new account's passwd entry. Iconic behaviour, honestly.
π¦ INVOCATION π¦
Heads up bestie: when sync-accounts-createuser gets invoked, the passwd and group entries have not yet been set up, so it may not rely on them. Not even a little. π
sync-accounts-createuser will not be supplied with any arguments. Zero. None. Nada.
However β and this is the good part β the following environment variables will be set, giving all the deets about the account to be created:
SYNCUSER_CREATE_USERSYNCUSER_CREATE_UIDSYNCUSER_CREATE_GIDSYNCUSER_CREATE_COMMENTSYNCUSER_CREATE_HOMESYNCUSER_CREATE_SHELL
π RESULTS π
sync-accounts-createuser should usually produce no output. Silent. Mysterious. Ethereal. π§
It can inhibit the creation of the user by outputting a single line not containing a colon. If it does that, a diagnostic message will be written to sync-accounts's logfile, and the user will be skipped. Not me cancelling a whole account with one little line π
Alternatively, it may write out an alternative password file entry, in which case sync-accounts will use the supplied data for the local passwd file instead of that from the remote host. The line should be in Sys-V passwd file format β and yes, regardless of localformat or remoteformat settings, periodt. The username field should be taken from SYNCUSER_CREATE_USER, and the password field should be x.
β EXIT STATUS β
0β All went well! Or, we wrote a line without a colon to say that the account should not be created. Either way, we slayed. π- any other β There were serious problems and
sync-accountsshould bomb out immediately. π Like, drop everything, this is bad.
π FILES π
None. That's it. That's the section. π
π ENVIRONMENT π
See above. π (It's the SYNCUSER_CREATE_* gang, we already went over them.)
π BUGS π
Lowkey a little exposed here: the supplied sync-accounts-createuser does not check that it was not supplied with any arguments; nor does it check that the SYNCUSER_CREATE_* variables are set, or have sensible values. It just trusts you. Wild, I know. π
π AUTHOR π
sync-accounts-createuser and this manpage were written by Ian Jackson <ian@chiark.greenend.org.uk>. They are Copyright 1999-2002 Ian Jackson <ian@davenant.greenend.org.uk>. This manpage forms part of the sync-accounts package. π¦β¨
sync-accounts-createuser and the sync-accounts package are free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
This is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, consult the Free Software Foundation's website at www.fsf.org, or the GNU Project website at www.gnu.org.
π₯ SEE ALSO π₯
okay that's the whole page bestie, you're officially educated π β¨ This one came out of the chiark utilities squad, brought to you by Greenend, dated 14th July 2002 β go forth and create those accounts, you've got this fr fr πΈπ¦π
π¦ where this page comes from
- debian bookworm: chiark-scripts 7.0.0
- debian trixie: chiark-scripts 8.0.1
- ubuntu jammy: chiark-scripts 6.1.2+nmu1
- ubuntu noble: chiark-scripts 7.0.0build2
- ubuntu questing: chiark-scripts 8.0.1
- ubuntu resolute: chiark-scripts 8.0.1build1
- ubuntu stonking: chiark-scripts 8.0.1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms