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_USER
  • SYNCUSER_CREATE_UID
  • SYNCUSER_CREATE_GID
  • SYNCUSER_CREATE_COMMENT
  • SYNCUSER_CREATE_HOME
  • SYNCUSER_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-accounts should 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 πŸŒΈπŸ¦‹πŸ’–