chiark / gitweb /
changelog: start new entry
[chiark-utils.git] / sync-accounts / sync-accounts-createuser.8
1 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
2 .TH SYNC\-ACCOUNTS\-CREATEUSER 8 "14th July 2002" "Greenend" "chiark utilities"
3 .SH NAME
4 sync\-accounts\-createuser \- helper/hook program for sync\-accounts
5 .SH SYNOPSIS
6 .BI SYNCUSER_CREATE_ var = "value\fP... \fI" sync\-accounts\-createuser
7 .SH DESCRIPTION
8 .B sync-accounts-createuser
9 is invoked by
10 .B sync-accounts
11 when sync-accounts is creating a local account.
12
13 It must perform all of the tasks involved with local account creation
14 except for the actual changes to the password, shadow and group
15 databases.
16
17 At the very minimum, it must create the new account's home directory
18 (with appropriate permissions).  The supplied sync-accounts-createuser
19 script does exactly that.
20
21 It may also suggest to sync-accounts modifications to the new
22 account's passwd entry.
23 .SH INVOCATION
24 When sync-accounts-createuser is invoked, the passwd and group entries
25 will not yet have been set up, so it may not rely on them.
26 sync-accounts-createuser will not be supplied with any arguments.
27 However, the following environment variables will be set, giving
28 details about the account to be created:
29 .br
30 .B " " SYNCUSER_CREATE_USER
31 .br
32 .B " " SYNCUSER_CREATE_UID
33 .br
34 .B " " SYNCUSER_CREATE_GID
35 .br
36 .B " " SYNCUSER_CREATE_COMMENT
37 .br
38 .B " " SYNCUSER_CREATE_HOME
39 .br
40 .B " " SYNCUSER_CREATE_SHELL
41 .SH RESULTS
42 sync-accounts-createuser should usually produce no output.
43
44 It can inhibit the creation of the user by outputting a single line
45 not containing a colon; in this case, a diagnostic message will be
46 written to sync-accounts's logfile, and the user will be skipped.
47
48 Alternatively, it may write out an alternative password file entry, in
49 which case sync-accounts will use the supplied data for the local
50 passwd file instead of that from the remote host.
51 The line should be in
52 Sys-V passwd file format (regardless of
53 .B localformat
54 or
55 .B remoteformat
56 settings).  The username field should be taken from
57 .BR SYNCUSER_CREATE_USER ,
58 and the password field should be
59 .BR x .
60 .SH EXIT STATUS
61 .TP
62 .B 0
63 All went well, or we wrote a line without a colon to say
64 that the account should not be created.
65 .TP
66 any other
67 There were serious problems and sync-accounts should bomb out
68 immediately.
69 .SH FILES
70 None.
71 .SH ENVIRONMENT
72 See above.
73 .SH BUGS
74 The supplied sync-accounts-createuser does not check that it
75 was not supplied with any arguments; nor does it check that the
76 .B SYNCUSER_CREATE_*
77 variables are set, or have sensible values.
78 .SH AUTHOR
79 .B sync-accounts-createuser
80 and this manpage were written by Ian Jackson
81 <ian@chiark.greenend.org.uk>.  They are Copyright 1999-2002 Ian
82 Jackson <ian@davenant.greenend.org.uk>.  This manpage forms part of
83 the sync-accounts package.
84
85 sync-accounts-createuser and the sync-accounts package are free
86 software; you can redistribute it and/or modify it under the terms of
87 the GNU General Public License as published by the Free Software
88 Foundation; either version 3, or (at your option) any later version.
89
90 This is distributed in the hope that it will be useful, but WITHOUT ANY
91 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
92 FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
93 details.
94
95 You should have received a copy of the GNU General Public License along
96 with this program; if not, consult the Free Software Foundation's
97 website at www.fsf.org, or the GNU Project website at www.gnu.org.
98 .SH SEE ALSO
99 .BR sync-accounts "(8), "
100 .BR sync-accounts "(5), "
101 .BR passwd "(5)"