31
31
username - used as a unix login name and svn repository name.
33
33
uid - the unix uid under which execution will take place
34
on the behalf of the user. Don't use 0!
36
password - the clear-text password for the user. If None is used
37
as an indication that external authentication should
34
on the behalf of the user. Don't use 0! If not specified
35
or None, one will be allocated from the configured
38
password - the clear-text password for the user. If this property is
39
absent or None, this is an indication that external
40
authentication should be used (i.e. LDAP).
40
42
nick - the display name to use.
45
47
rolenm - The user's role. Must be one of "anyone", "student",
46
48
"tutor", "lecturer", "admin".
47
49
STRING/ENUM REQUIRED
48
studentid - If supplied (not None), the student id of the user for
50
studentid - If supplied and not None, the student id of the user for
49
51
results and/or other official purposes.
53
Return Value: the uid associated with the user. INT
53
56
if 'uid' not in props:
57
raise Exception, "No algorithm for creating uids yet!"
57
61
common.makeuser.make_user_db(props['username'], props['uid'],
58
62
props['password'], props['nick'],
59
63
props['fullname'], props['rolenm'],
60
64
props['studentid'])
68
def create_jail(props):
69
"""Create the jail for a user.
71
username - the username for the jail
73
uid - the unix uid to make the owner of the home directory
76
gid - the unix group id to make the group of the home directory
77
in the jail. If not supplied (or None), then the uid is
62
81
common.makeuser.make_jail(props['username'], props['uid'])
64
# eventually, we're going to want to grant shell access, in which
65
# case we'll need to add the uid to the password file. Magic to do
66
# that should go here.
71
'create-user':create_user
85
'create-user':create_user,
86
'create-jail':create_jail
74
89
def dispatch(props):