2. Authentication
2.1 Login procedure
2.2 Logout procedure
2.3 At the command line
2.4 Remote access
3. Menu structure of the web interface
3.1 Users and groups
3.2 Shortcuts
3.3 Tools
4. Managing workgroups
4.1 Add a workgroup
4.2 Adding users to a workgroup
4.3 Delete a workgroup
5. Managing users
5.1 General information
5.2 Adding a teacher account
5.3 Adding a nest (grade) account
5.4 Adding a single pupil account
5.5 Modifying a user account
5.6 Deleting a user account
5.7 Adding multiple user accounts
5.8 Adding multiple pupils via file upload
5.9 Promoting nests (grades) manually
5.10 Promoting nests (grades) via file upload
6. Managing CD-ROM images
6.1 Creating .iso-files via the web interface
6.2 Creating .iso-files via the command line
6.3 Removing CD-ROM images
7. Advanced topics
7.1 Tweaking Janitor via janitor.conf
7.2 Tweaking the web interface via config.php
During the installation of ServerAtSchool at least one user account with the necessary privileges was created, see section 10.4 Adding the first user account in chapter V. Configuring all ServerAtSchool components in the ServerAtSchool Installation Guide. Because there has to be at least a single account with janitor-privileges in order to create accounts via the web interface, the first account is to be created via the command line. Subsequent user accounts can be created via either method.
Throughout this chapter the word 'group' is used in many different meanings. We try to distinguish the different meanings by using different words. The following meanings of 'group' are used.
janitorcmd(1). These are
accessible via janitor(1). The command line program
janitor(1) is only available for users that are a member
of the (predefined) group janitors. The root
account is also allowed to use the program.
The web interface builds on the command line layer. It too can only
be used by members of the group janitors. However, it is
not possible to access the web interface using the password of
root. This is a security measure.
NOTICE: Note that we reduced the number of 'extra' fields in order to make the illustrations in this chapter fit on the page. Default is 5, we decreased that number to 2. See also section 7.2 Tweaking the web interface via config.php below for more information on changing this value.
Nearly all tasks that are described can be performed from either the web interface or the command line. Both methods are discussed. Note, however, that a few tasks can only be done in the web interface whereas a few other tasks can only be performed via the command line.
edexdata(1). You can use this utility, located in
/usr/sbin/janitor/edexdata to regenerate the
data and follow all examples in detail in order to get to know the
ServerAtSchool system. Of course this is done best on
a computer that is not used for production. Note that you need to be
root to access this utility.
http://www.exemplum.serveratschool.net/janitor/ or
http://praeceptor.exemplum.serveratschool.net/janitor/.
NOTICE: You can use any browser to access the web interface of Janitor; no JavaScript is required. However, it is necessary to allow cookies.
Open the relevant URL in you browser. A screen like the following appears.
![[ login screen for web interface Janitor ]](janitor/janitor_login.png)
Enter you username (here 'ffrint' is already entered) and password
(already entered, too). Press [OK] to confirm the
dialogue. Your credentials are verified and if username and password
match, something like the following is displayed.
![[ mani menu for web interface Janitor ]](janitor/janitor_mainmenu.png)
This is the main menu of the Janitor web interface. You are successfully logged in.
![[ mani menu for web interface Janitor ]](janitor/janitor_mainmenu.png)
At the upper right corner there is a link called 'logout' which enables you to end your session with Janitor. When you follow that link, the following appears.
![[ logout screen for web interface Janitor ]](janitor/janitor_logout.png)
You are now logged out as indicated by the red message 'You have been logged out' at the top of the screen. At this point you can login again if you wish.
janitor(1) program. The example below illustrates logging
in on the console. Your input is emphasised.
|
At this point ffrint is sucessfully logged in on the console.
Note that you can verify your membership of the group janitors with
the command id(1). This is illustrated in the snippet below.
|
Ending the session on the console can be done with the
exit(1) command, as illustrated below.
|
Alternatively, you can press the keycombination [Ctrl-D]
to end the session.
NOTICE: Your access to the janitor program is granted based on your membership of the janitors group. Even if you have a shell account on the server you might still be unable to use the janitor program if you are not a member of that group. Hence an ordinary teacher with shell access does not necessarily have access to the janitor program too. This is a security feature.
|
This same method can be used to login to the server from a workstation
in the LAN, using the Windows-based program
PUTTY.EXE. See section 11.1.3
PuTTY in chapter IV. Workstation
setup. From the point of view of the server, both cases are
'remote access' (i.e. not from the console), even though accessing the
server from home is more remote than accessing it via the LAN.
![[ mani menu for web interface Janitor ]](janitor/janitor_mainmenu.png)
At the upper left hand corner the name and the version of Janitor are displayed. The upper right hand corner shows the name of the user currently logged in.
Just below the program name and version and the user name is a gray bar. This bar is used to show a so-called breadcrumb trail, starting with the main menu, reading from left to right. Note that in submenus the various breadcrumbs are clickable, i.e. you can navigate straight to one of the previous 'crumbs' simply by clicking on the link in the gray bar.
At the right hand side of the gray bar a link called 'logout' is displayed. Following that link ends the session.
The remainder of the screen is used to display the various options of the main menu. There is a total of three options in the main menu.
![[ overview of users and groups at the beginning ]](janitor/janitor_overview.png)
The shared documents and files are visible via subdirectories contained
within 'My Documents' (or H:\My Documents). Every member of a
workgroup has access to these shared documents this way.
For example: if there exists a workgroup called 'principals', with
members 'acackl' and 'adumbl', then either of the users 'acackl' or
'adumbl' has a folder called 'principals' with their own personal 'My
Documents'. This is the equivalent of the subdirectory H:\My
Documents\principals. No other users have access to this shared
folder.
The total number of workgroups is limited to some 45,000. However, it is not possible to be a member of more than 32 groups at the same time. In practice this should be enough for a school. (If you would be a member of more than 32 workgroups, there would probably be no time left at all to do some actual work).
This is what is displayed on the screen while you enter the name of the workgroup.
![[ adding a workgroup via the web interface ]](janitor/janitor_add_workgroup1.png)
This is what is shown on the screen after the new workgroup is added successfully.
![[ success adding a workgroup via the web interface ]](janitor/janitor_add_workgroup2.png)
A workgroup, say 'principals', can also be added using the command line. If you wish to add this workgroup, you should do the following. At the prompt issue the command 'janitor groupadd principals' as illustrated below.
|
You can add workgroups either way: via the web interface or via the command line interface. You might want to add the following workgroups too: 'faculty' (for all teachers), 'healthcare' (for members of the Healthcare Committee). You also may want to add a workgroup 'jubilee'. This would be the temporary workgroup used to organise the 50th aniversary of the Exemplum Primary School.
NOTICE: The workgroups suggested here are used in other examples in the remainder of this chapter.
----------no
group selected---------- and select the relevant group
![[ adding a user to a workgroup ]](janitor/janitor_add_user_to_workgroup1.png)
After clicking the [Save] button the following appears. Via the message 'Success modifying user: ffrint' in red at the top of the screen Janitor indicates that the properties of user 'ffrint' are changed successfully.
![[ success adding a user to a workgroup ]](janitor/janitor_add_user_to_workgroup2.png)
NOITICE: The number of drop down boxes in the 'edit user' dialogue is limited to the current number of workgroups of which the user is a member plus 3. If you want to add a user to more than 3 different workgroups more, you should simply repeat the procedure adding the user to at most 3 groups more at a time. The number of 'spare' drop down boxes can be configured, see section 7.2 Tweaking the web interface via config.php below.
At the command line the procedure for adding a user to one or more workgroups is a little more complicated because it is only possible to change the workgroup membership of a user by specifing all workgroups on the command line. Using the same example (adding user 'ffrint' to workgroups 'staff' and 'jubilee'), the appropriate command would look like this.
|
Note that the switch -G is a capital letter G, not the
lower case letter 'g'. Also note that the list of workgroups is comma
delimited, without spaces.
![[ deleting a workgroup ]](janitor/janitor_delete_workgroup1.png)
At this point there is no way to delete a workgroup using the web interface; this function is not implemented yet.
However, via the command line a workgroup can easily be deleted. If you want to remove an existing workgroup (here: 'jubilee'), you should issue the following command at the prompt.
|
Note that the switch -r is used here. This switch tells
Janitor to also remove the shared directory from the file system,
including any existing documents in that shared directory. Any shared
documents elsewhere are not affected. If you do not specify this
switch, the directory and any documents are retained. However, since
the workgroup no longer exists there are no longer users that are
allowed to access those documents.
NO PASSWORD is a special case; it
allows users to login to the network without specifying a password at all
NO
PASSWORD the corresponding user is granted access to Windows
Networking without specifying a password. This can be a feature for
the lower grades. However, the userid should still be specified.
A workable solution is to construct the userids of staff using the first letter of the first name followed by a limited number of letters, say 5, of the lastname and not using the infix. This would yield 'aschur' for 'Anna Maria van Schurman'. Userids for pupils could be constructed by using the first name, optionally followed by a digit. The digits need only be used when there is actually a name clash. Of course it also possible to append a number to all pupils in order to treat them equally. By using different strategies for staff and pupils the chance that a pupil name clashes with a member of staff is minimised.
Another reason to use constructed names for staff members (which probably have teleworking privileges) is that there are many would-be crackers on the loose (also known as 'script kiddies') that try to brute-force an entry to the server using long lists of first names with obvious passwords. If the school does not have teacher accounts like 'john', 'paul' or 'george', these attempts will simply fail because those userids do not exist. If there are pupil accounts with those names the attempts will also fail because as a rule pupils do not have teleworking access to the school server. However, if you want to make it even harder for the script kiddies you could opt for always appending a number to the userids of pupils.
It is important to have good passwords for those users that will be allowed to access the school server from outside of the school (teleworking, webmail). This subject is discussed in section 2.5 Choosing passwords in chapter V. Configuring all ServerAtSchool components in the ServerAtSchool Installation Guide.
In short, a 'good' password has at least one digit (0,...,9), at least one lowercase letter (a,...,z), at least one uppercase letter (A,...,Z) and preferably at least one special character. Suitable special characters are: at-sign '@', hash '#', dollar '$', percent '%', caret '^', ampersand '&', asterisk '*', left parenthesis '(', right parenthesis ')', dash '-', underscore '_', plus '+', equals '=', left curly brace '{', right curly brace '}', opening bracket '[', closing bracket ']', semicolon ';', slash '/', dot '.' and question mark '?'. It is also a good idea to choose a password of at least 8 characters long.
NOTICE: Because of the way Janitor works you should not use a colon ':' as part of a password. The same applies to the use of a single quote ('''), a double quote ('"') and a backtick ('`').
NOTICE: There are two different passwords in ServerAtSchool. One is used for teleworking and access to e-mail (webmail). The other one is used to authenticate the user for Windows Networking. It is recommended to choose two different passwords. That way the teleworking and e-mail is still protected, even when the SMB password is compromised.
NOTICE:
It is a good idea to use e-mail aliases that are different from
the user accountnames. That way you can simply change to new alias
when the old one is on too many spammers' lists. Once your
real accountname is on a spammer's list, you can not easily
stop the unwanted e-mail by changing your e-mail address because you
can not change a user accountname. This is especially important with
the e-mail aliases for grades (nests). It is better to use
pupils.grade7@exemplum.serveratschool.net and switch to
pupils.of.7th.grade@exemplum.serveratschool.net when
necessary than to keep accepting spam at
grade7@exemplum.serveratschool.net forever.
| privilege | necessary properties |
|---|---|
| webmail access |
account must have a password (-P switch)account must have webmail access ( -I switch)(optional) account may need 1 or more aliases ( -E switch)
|
| teleworking |
account must have a password (-P switch)account must be a member of group 'teleworkers' ( -G switch)account must have a login shell ( -s switch)
|
| local system administration (via web interface) |
account must have a password (-P switch)account must be a member of group 'janitors' ( -G switch)account must have a login shell ( -s switch)
|
| local system administration (via command line) |
account must have a password (-P switch)account must be a member of group 'janitors' ( -G switch)account must have a login shell ( -s switch)account must have an 'advanced user' home directory ( -d switch)
|
| local system administration (assigning shortcuts/icons) |
account must have an SMB password (-W switch)account must be a member of groups 'janitors' and 'programs' ( -G switch) |
| local system administration (all of the above) |
account must have a password (-P switch)account must have an SMB password ( -W switch)account must be a member of groups 'janitors' and 'programs' ( -G switch)account must have a login shell ( -s switch)account must have an 'advanced user' home directory ( -d switch)
|
NOTICE: The actual output is split into two different illustrations because of layout considerations. Please use the scroll bar at the right hand side to scroll through the page.
![[ adding a teacher account (part 1) ]](janitor/janitor_add_teacher1.png)
![[ adding a teacher account (part 2) ]](janitor/janitor_add_teacher2.png)
Explanation:
After all properties are entered press the [Save] button. The following appears on the screen.
![[ success adding a teacher account ]](janitor/janitor_add_teacher3.png)
The message in red shows that the account was created successfully.
NOTICE: The command can be split over multiple lines by using the line continuation feature (the backslash '\' followed by a newline) of the shell as shown below. However, it is not necessary; you can simply type the (long) command on a single line. The command is split up in separate lines in the illustration below for layout reasons.
|
Explanation:
janitor useraddjanitor(1),
asking it to perform the function useradd. (In total there
are some 18 functions that can be executed this way; use
janitor without parameters to get a quick overview). The
remainder is a list of arguments for Janitors useradd function.
-c "Burrhus Frederic Skinner"-c sets the comment field in the system's
user database /usr/passwd. This field is sometimes referred to
as the GECOS field. This field is used to store the
name of the user in human-readable form. Note that the GECOS field is
also used to store 'extra' information. See the example in section
5.4.2 Adding a single pupil account via the command line
below for more specific information.
-d /home/userdata/./home/users/bskinn-d defines the full path to the user's home
directory. In this case the user is to be limited to a chroot jail. This is done
by specifying an extra dot and a slash in the path, between 'userdata'
and 'home'. If the user would not be limited to the chroot
jail, the full path would have to be specified without an extra dot
and a slash between 'userdata' and 'home' like this:
/home/userdata/home/users/bskinn. Note that the default
is to limit a new account to a chroot jail so strictly speaking this
option was superfluous in this example.
-G programs,teleworkers,staff,faculty-G defines the secondary groups for this
user. These secondary groups must already exist before any of
them are used. In this case they are all defined and can therefore
be used without having to add them to the system first. By making this
account a member of these groups, the following privileges are granted
to the account:
using WinSCP or
PUTTY.EXE) or from the LAN (with PUTTY.EXE).
-s /bin/bash-s defines the command shell for this
account. By default the 'shell' /sbin/nologin is assigned
to a user account. This 'shell' simply denies access (it immediately
logs out the user). This is a security measure. Only if the account
has a real shell like /bin/bash the user will be able to
login (remotely via ssh or at the console). Note that the account must both be
a member of the group teleworkers (for access via ssh) and
have a real shell.
-P 'coNnLV9V'-P defines the shell password for the user
account. This is the password that is used to authenticate the user
for
-I below)
/bin/bash
is specified as shell and the user is a member of the group teleworkers)
-W 'icheiwoi'-W defines the user's password for Windows
Networking via the Samba server. This password is used to access the
server from a Windows client computer. Note that a user account has
two passwords. It is a good idea to make sure that both
passwords are different. This keeps the -P password
(sometimes called the 'difficult' password) secret, even if the
-W password (sometimes called the 'easy' password or the
SMB password) would be compromised.
-E burrhus.skinner-E defines the user's e-mail aliases. It
consists of a comma delimited list of different aliases for this
user's mailbox. In this case the mailbox name is bskinn
(see below, the last item in this list) and the alias defined via
-E makes that mail addressed to
burrhus.skinner@exemplum.serveratschool.net
ends up in mailbox bskinn. Note that the first alias in the
list is also used as the From-address in Squirrelmail. Also note that
the domain name should not be specified here, just the bare aliases.
-I 0.0.0.0/0-I defines a comma delimited list of
IP-addresses from which it is allowed to access webmail
(Squirrelmail). By default access to webmail is limited to the LAN,
using 127.0.0.0/8,172.17.2.0/24. In the case of this
user account access is unlimited; this user is allowed to access
webmail from anywhere in the world. Specifying no access at all could
be done via 255.255.255.255/32.
bskinn
![[ status quo after adding two teacher accounts ]](janitor/janitor_add_teacher4.png)
NOTICE: In these examples a nest and its pupils have no access to webmail and teleworking. Of course, pupils might be granted teleworking access and webmail access because after all, they have a normal user account even though one with miminal privileges. However, most of the time granting access is only used to enable an individual pupil to participate in school activities from home, in case of long absence due to illness (e.g. a broken leg).
Below are examples of adding a nest account via the web interface and via the command line.
NOTICE: The actual output is split into two different illustrations because of layout considerations. Please use the scroll bar at the right hand side to scroll through the page.
![[ adding a nest account (part 1) ]](janitor/janitor_add_nest1.png)
![[ adding a nest account (part 2) ]](janitor/janitor_add_nest2.png)
Explanation:
After all properties are entered press the [Save] button. The following appears on the screen.
![[ success adding a nest account ]](janitor/janitor_add_nest3.png)
The message in red shows that the account was created successfully.
NOTICE: This example creates a nest by the name 'grade12', pronounced as 'grade one two'. If your school happens to have a 'grade twelve' you have a name clash. A solution would be to name the nests for the youngest pupils something like 'kindergarten12', freeing the name 'grade12' for grade twelve. Alternatively your nests may already have a name the could be used as a userid, like 'ladybirds', 'fireflies', 'jaguars', etc.
NOTICE: The command can be split over multiple lines by using the line continuation feature (the backslash '\' followed by a newline) of the shell as shown below. However, it is not necessary; you can simply type the (long) command on a single line. The command is split up in separate lines in the illustration below for layout reasons.
|
Explanation:
janitor useraddjanitor(1),
asking it to perform the function useradd. (In total there
are some 18 functions that can be executed this way; use
janitor without parameters to get a quick overview). The
remainder is a list of arguments for Janitors useradd function.
-c "Pupils grade 3"-c sets the comment field in the system's
user database /usr/passwd. This field is sometimes referred to
as the GECOS field. This field is used to store the
name of the user in human-readable form. Note that the GECOS field is
also used to store 'extra' information. See the example in section
5.4.2 Adding a single pupil account via the command line
below for more specific information.
-G programs-G defines the secondary groups for this
user in the form of a comma delimited list. These secondary groups
must already exist before any of them are used. In this case
there is only one: 'programs'. By making this nest account a member of
the group 'programs' this account is allowed to access Windows programs
and files via the Samba server.
-W 'NO PASSWORD'-W defines the user's password for Windows
Networking via the Samba server. This password is used to access the
server from a Windows client computer. Note that a user account can
have two passwords. It is a good idea to make sure that both
passwords are different. This keeps the -P password
(sometimes called the 'difficult' password) secret, even if the
-W password (sometimes called the 'easy' password or the
SMB password) would be compromised. In this particular case the
account has no 'difficult' password at all. The SMB password is set to
the special value 'NO PASSWORD', indicating that this user account is
allowed access to Windows Networking by specifying the userid and
leaving the password field empty (i.e. logon without password). Note
that the special value used here ('NO PASSWORD') must be specified
using quotes because this special password contains a space.
-I 255.255.255.255/32-I defines a comma delimited list of
IP-addresses from which it is allowed to access webmail
(Squirrelmail). By default access to webmail is limited to the LAN,
using 127.0.0.0/8,172.17.2.0/24. In the case of this
user account access is not allowed; this user is not allowed to access
webmail from anywhere in the world. Specifying unlimited access could
be done via 0.0.0.0/0.
grade3
![[ status quo after adding two nest accounts ]](janitor/janitor_add_nest4.png)
Another difference with a teacher or a nest account is that a pupil generally needs even less privileges, e.g. no working from home, no teleworkers, no shell account and access to webmail limited to the school premises or even completely disabled. A pupil may not even have an SMB password, denying the pupil access to Windows Networking.
NOTICE: Of course it is possible to let pupils have their own personal accounts on the school server, maybe even allowing them to use webmail etcetera. However, most of the schools that have deployed ServerAtSchool opted for using a single account per grade. This is a pedagogical choice which adds to the sense of co-operation within a community like a school. The pupil accounts are created for the sole purpose of storing a pupil's work in such a way that this work (a 'portfolio' if you wish) can travel along with the pupil on the pupils journey from grade 1 to grade 8. The account is created as a container for files and documents rather than as a full-blown account with passwords and things. However, it certainly is possible to do so, for instance to enable an individual pupil to participate in school activities from home, in case of long absence due to illness (e.g. a broken leg).
Below are examples of adding a pupil account via the web interface and via the command line. However, it is much more practical to manage pupil accounts using the upload feature as discussed in section 5.8 Adding multiple pupils via file upload below.
NOTICE: The actual output is split into two different illustrations because of layout considerations. Please use the scroll bar at the right hand side to scroll through the page.
![[ adding a pupil account (part 1) ]](janitor/janitor_add_pupil1.png)
![[ adding a pupil account (part 2) ]](janitor/janitor_add_pupil2.png)
Explanation:
After all properties are entered press the [Save] button. The following appears on the screen.
![[ success adding a pupil account ]](janitor/janitor_add_pupil3.png)
The message in red shows that the account was created successfully.
NOTICE: The command can be split over multiple lines by using the line continuation feature (the backslash '\' followed by a newline) of the shell as shown below. However, it is not necessary; you can simply type the (long) command on a single line. The command is split up in separate lines in the illustration below for layout reasons.
|
Explanation:
janitor useraddjanitor(1),
asking it to perform the function useradd. (In total there
are some 18 functions that can be executed this way; use
janitor without parameters to get a quick overview). The
remainder is a list of arguments for Janitors useradd function.
-c "Catharina Giacomo,00439,19991015"-c sets the comment field in the system's
user database /usr/passwd. This field is sometimes
referred to as the GECOS field. This field is used to store
the name of the user in human-readable form. However, the same field
is also used to store the contents of the extra fields. This takes the
form of a comma-delimited list. The first item in the list is the full
name of the user, the second item is the first extra field, the third
item is the second extra field, etcetera. In this case two extra
fields are used. The first one stores the number '00439' under which
the pupil is known in the school's administration system, the second
one contains the pupil's day of birth using the format yyyymmdd. There
are no restrictions to the content of the various fields except that
these fields can not contains commas ',' or colons ':' because the
these characters are used as delimiters. Note, however, that these
extra fields are in fact used when uploading pupils' data,
see section 5.8 Adding multiple pupils via file
upload below.
-g grade3-g defines the primary group for this
user. By selecting this primary group 'grade3', the account
'catharina' becomes a pupil account (this is the definition of a pupil
account, see section 5.1.2 Different types of user
accounts above). At the same time the account 'grade3' is
transformed from a regular account into a nest if this was not already
the case. Note that the group 'grade3' should already exist.
Also note that secondary groups are defined with parameter
-G followed by a comma delimited list of secondary
groups. However, this particular account has no secondary groups.
-I 255.255.255.255/32-I defines a comma delimited list of
IP-addresses from which it is allowed to access webmail
(Squirrelmail). By default access to webmail is limited to the LAN,
using 127.0.0.0/8,172.17.2.0/24. In the case of this
user account access is not allowed; this user is not allowed to access
webmail from anywhere in the world. Specifying unlimited access could
be done via 0.0.0.0/0.
catharina
![[ status quo after adding two pupils to two nest accounts ]](janitor/janitor_add_pupil4.png)
Below are examples of modifying a regular account (including hints for modifying nests and pupils) via the web interface and via the command line.
![[ selecting a regular user account to modify ]](janitor/janitor_modify_user1.png)
Follow the relevant link in the column 'userid', e.g. 'hparkh'. This yields a screen with the properties of the selected user account, see section 5.5.2 Changing the properties of an account via the web interface below.
If you want to change the properties of a nest or a pupil account, you should take the following steps. In Janitor, navigate to: main menu | users and groups | modify users and groups | nests. The following appears on the screen.
![[ selecting a nest or a pupil account to modify ]](janitor/janitor_modify_user2.png)
In this screen you can proceed to change the properties of a nest by following the link for the appropriate account in the column labeled 'userid', at the left hand side. In this example that would be either 'grade12' or 'grade3'. By following that link, you can change the properties of a nest in much the same way as you would when adding a nest account as discussed in section 5.3.1 Adding a nest (grade) account via the web interface above.
You can also proceed to change the properties of an individual pupil by following the link for the appropriate account in the second column of the screen. In this example that would be either the account of May Sinclair (follow the blue link 'may') or the account of Catharina Giacomo (follow the blue link 'catharina'). By following the link, you can change the properties of the individual pupil account in much the same way as you would when adding a pupil account as discussed in section 5.4.1 Adding a single pupil account via the web interface above.
NOTICE: In this screen there are two clickable links labeled 'grade12' and also two clickable links labeled 'grade3'. The links in the column labeled 'userid' lead to the screen where the properties of the nest can be modified. Following a link in the column labeled 'group' would take you to the screen where all pupils can be promoted to the next grade. This procedure is explained in section 5.9.2 Promoting pupils via the web interface below.
We need to modify the properties of Helen Parkhurst's account because she is also a member of the school's Healthcare Committee and she is also the teacher for grade 3. This means that the account 'hparkh' needs to be added to the groups 'healthcare' and 'grade3' as is shown in the image below.
![[ adding two more workgroups to a regular user account ]](janitor/janitor_modify_user3.png)
NOTICE: All current properties for the account are shown in the screen shown above, except the passwords. There is no way to retrieve an existing password (neither the SMB password nor the e-mail password). If a user has lost or forgotten a password, only a new one can be assigned to that user. This is a security feature.
NOTICE: The extra space for additional groups was added automatically. When creating the account initially, a total of 4 secondary groups could be added. Now, while editing the properties of the account, another three secondary groups can be added. This can be repeated until an account is a member of 32 secondary groups.
After the groups are added, all changes need to be saved. This can be done by pressing the [Save] button at the bottom of the screen.
NOTICE: If you want to discard the changes, you can simply press the [Cancel] button or navigate to another screen using the breadcrum trail in the gray bar near the top of the screen.
After pressing the [Save] button the following screen appears.
![[ success modifying a regular user account ]](janitor/janitor_modify_user4.png)
The text in red indicates that the changes were saved successfully.
NOTICE: After changing the properties of an individual pupil a slightly different screen is displayed. You can return to the list of nests by navigating in Janitor using the links in the breadcrum trail in the gray bar near the top of the screen. Simply follow the link labeled 'nests'.
|
Explanation:
janitor usershow bskinnjanitor usermod -E burrhus.skinner,coach bskinn-E switch to change the complete
list of e-mail aliases. Note that existing aliases need to be
specified too in order to preserve them. This command works in such a
way that the existing list is replaced by the new list. You can not
'add' an alias.
janitor usershow bskinn
NOTICE:
It is important to remember that the 'usermod' command in
janitor(1) replaces properties rather than
extends the existing ones. This is especially important when adding a
user to a new (secondary) group using the -G switch:
you should specify all the existing secondary groups for
the account and add the new group to that list.
NOTICE:
The human readable name of the account is stored in the comment field
in /etc/passwd. This is sometimes referred to as the
GECOS field. ServerAtSchool uses this field not only to store
the full name of the user, but also for the so-called 'extra'
fields. Therefore changing or adding an extra field (using the
-c switch) involves specifying the existing contents
of the other extra fields and the full name, too. See also section
5.4.2 Adding a single pupil account via the command
line above for an example of the -c switch.
![[ selecting a regular user account to delete ]](janitor/janitor_delete_user1.png)
Follow the link in the rightmost column (labeled 'delete') for the account you wish to delete. e.g. for Helen Parkhurst follow the link in the last line. A confirmation dialogue appears.
![[ confirming deletion of a regular user account ]](janitor/janitor_delete_user2.png)
At this point you can confirm the deletion of the user account by pressing the [Delete] button. After pressing that button the following appears on screen.
![[ status quo after deletion of a regular user account ]](janitor/janitor_delete_user3.png)
The message in red confirms that the user account is in fact removed from the system.
It is also possible to remove accounts using the command line. If you want to delete an acocunt that way, you have to be logged in your shell account on the server. You should issue the following command to delete a user account (in this example the user account 'bskinn'). Note that your input is emphasised in the illustration below.
|
After issuing this command the regular account 'bskinn' is removed from the
system in two distinct steps. First the user account itself is
removed, see message 047 in the example. After that the user accounts
primary group is deleted, see message 046. The switch -r
makes sure that all data in this account's home directory and below is
removed. If you do not specify this -r switch,
all files belonging to this user are left as-is; the home directory is
left intact.
NOTICE:
The -r switch only deletes the directory tree starting at
the user's home directory. Any shared files, e.g. files in the
workgroup 'staff' or 'faculty' are retained whether -r
was specified or not.
NOTICE:
Deleting a regular user account via the web interface always implies
the -r switch.
NOTICE:
Messages from Janitor all have a number like '046' and '047'. This
makes it easier to parse the output from Janitor with another
program even if the messages themselves would have been translated
into another language. A complete list of message can be found in
/etc/janitor/janitor.msg. Further discussion of this
mechanism is beyond the scope of this manual.
If you want to delete a pupil account using the web interface you should take the following steps. In Janitor, navigate to: main menu | users and groups | modify users and groups | nests. The following appears on the screen.
![[ selecting a pupil account for deletion (step 1) ]](janitor/janitor_delete_pupil1.png)
This is an overview of all nests (grades) with pupil accounts. Before you can delete an individual pupil account, you have to 'zoom in' in the list of pupils in a particular grade. You can do so by following the link in the second column of the nest (grade) of interest. In this example, follow the link labeled 'grade12' in the column 'group'. The following screen appears.
NOTICE: If you follow the link in the left-most column you end up in the screen where you can modify the properties of the nest as explained in section 5.5.1 Navigating to the edit screen in the web interface above.
![[ selecting a pupil account for deletion (step 2) ]](janitor/janitor_delete_pupil2.png)
This screen presents to you an overview of all pupils in the selected nest (grade), here 'grade12'.
NOTICE: The main purpose of this screen is to move pupil accounts to another nest (grade), a nest at a time. This is discussed in section 5.9 Promoting nests (grades) manually below. However, the same screen is also used to delete individual pupil accounts.
The list of all pupils in grade12 is very short in this case; there is only one pupil: 'May Sinclair'. If you want to delete this pupil account, including all personal files and documents that belong to this user, you should follow the link labeled 'delete' in the rightmost column. The following screen appears.
![[ configming deletion of a pupil account ]](janitor/janitor_delete_pupil3.png)
At this point you can confirm the deletion of the user account by pressing the [Delete] button. After pressing that button the following appears on screen.
![[ success deleting pupil account ]](janitor/janitor_delete_pupil4.png)
The message in red confirms that the user account is in fact removed from the system.
Note that by removing the last pupil, the account 'grade12' is now an empty nest. If necessary, it can now be deleted, see section 5.6.3 Deleting a nest (grade) account below. Also, because there are no pupils in 'grade12' anymore, the nest account is transformed back into a regular account.
It is also possible to remove accounts using the command line. If you want to delete an acocunt that way, you have to be logged in your shell account on the server. You should issue the following command to delete a user account (in this example the user account 'catharina'). Note that your input is emphasised in the illustration below.
|
Note that only the bare account 'catharina' is deleted (message 047 in the illustration). The primary group of the account, 'grade3' is not deleted automatically. This is done this way because there is at least 1 other account that has the group 'grade3' as the primary group. This is the account 'grade3' itself. Therefore the group 'grade3' can not be deleted at this time.
The switch -r
makes sure that all data in this account's home directory and below is
removed. If you do not specify this -r switch,
all files belonging to this user are left as-is; the home directory is
left intact.
NOTICE:
The -r switch only deletes the directory tree starting at
the user's home directory. Any shared files are retained whether
-r was specified or not.
NOTICE:
Deleting an account via the web interface always implies the
-r switch.
NOTICE: Because 'catharina' was the last pupil of 'grade3' the account 'grade3' is now an empty nest. Therefore it is transformed back into a regular account. If necessary, it can now be deleted.
After you have removed all pupils from the nest, the nest account is transformed back into a regular account. If you now want to delete the empty nest account, you should take the following steps. In Janitor, navigate to: main menu | users and groups | modify users and groups | all. The following appears on the screen.
![[ selecting a nest for deletion ]](janitor/janitor_delete_nest1.png)
NOTICE: You could have navigated to: main menu | users and groups | modify users and groups | regular users. However, by selecting 'all', you get a clean overview of all users and groups, not just regular users.
Follow the link in the rightmost column (labeled 'delete') for the account you wish to delete. e.g. for 'Pupils grade 1 and 2' follow the link in the second line. A confirmation dialogue appears.
![[ confirm deletion of nest ]](janitor/janitor_delete_nest2.png)
At this point you can confirm the deletion of the user account by pressing the [Delete] button. After pressing that button the following appears on screen.
![[ status after deletion of nest ]](janitor/janitor_delete_nest3.png)
The message in red confirms that the user account is in fact removed from the system.
It is also possible to remove accounts using the command line. If you want to delete an account that way, you have to be logged in your shell account on the server. You should issue the following command to delete a user account (in this example the account 'grade3'). Note that your input is emphasised in the illustration below.
|
After issuing this command the regular account 'grade3' is removed from the
system in two distinct steps. First the user account itself is
removed, see message 047 in the example. After that the user accounts
primary group is deleted, see message 046. The switch -r
makes sure that all data in this account's home directory and below is
removed. If you do not specify this -r switch,
all files belonging to this user are left as-is; the home directory is
left intact.
NOTICE:
The -r switch only deletes the directory tree starting at
the user's home directory. Any shared files are retained whether
-r was specified or not.
NOTICE:
Deleting a user account via the web interface always implies
the -r switch.
This section illustrates the possibilities of batched creation of user accounts. Section 5.7.1 File format for batch processing discusses the rules which the batch file has to obey for correct processing. Section 5.7.2 Preparing a batch file for the staff members shows how a batch file could be created. Finally section 5.7.3 Processing the batch file shows how a prepared batch is processed using the command line.
The main purpose of this feature of Janitor is to mass-create the accounts for the members of the school's staff. As a rule this is a one-time operation. Subsequent addtitions of staff accounts can easily be done manually, using the procedures discussed in section 5.2 Adding a teacher account above. Of course this assumes a reasonable (i.e. not too many) number of new accounts every (school)year.
Adding pupil accounts is a different matter because a school usually has many more pupils than teachers. This is the reason for a special procedure for adding pupil accounts in bulk, see section 5.8 Adding multiple pupils via file upload below.
The example in this section focusses on adding accounts for all members of the staff of the Exemplum Primary School. The example starts at the same point as the beginning of section 5. Managing users as shown in the illustration below.
NOTICE: Refer to section 2. The Exemplum Primary School in chapter II. ServerAtSchool User Manual Overview for details about the school population.
![[ status quo before mass addition of teachers accounts ]](janitor/janitor_status_quo.png)
As you can see, there is only a single regular account (Freddie Frinton). No nests (grades) exist yet. However, all necessary workgroups such as 'faculty', 'healthcare' and 'staff' are already created (see section 4.1 Add a workgroup above).
gecos, sgroups,
aliases, ips) are in themselves comma
delimited lists.
The format of this string is as follows:
userid:uid:pgroup:gecos:home:shell:sgroups:pwd:smbpwd:skel:aliases:ips
Explanation:
userid: the name of the account (max. 16 letters and digits)
uid: numerical user id
pgroup: the name of the primary group (max. 16 letters and digits)
gecos: a comma delimited list of additional
information:
home: full path to user's home directory
shell: full path to the command shell for this account
sgroups: comma delimited list of secondary groups (max. 16 letters and digits each)
pwd: shell password, a.k.a. the 'difficult' password
smbpwd: smb password, also known as the Windows Networking or the 'easy' password
skel: skeleton directory
aliases: comma delimited list of e-mail aliases
ips: comma delimited list of allowable IP-addresses for web
mail access (CIDR format)
If these fields are non-empty in the batch file, they should conform to the rules as specified in section 5.1.1 Properties of a user account, e.g. a userid must consist of 1 to 16 lowercase letters and digits, starting with a letter, etcetera. However, if the fields are left empty, the following default values apply.
userid: there is no default, the userid must
be specified.
uid: the next available number in the system
pgroup: the same as the userid field
gecos: empty string (no full name, and no extra fields)
home: /home/userdata/./home/users/userid
shell: /sbin/nologin
sgroups: empty (no secondary groups)
pwd: none
smbpwd: none
skel: /home/userdata/home/skeletons/skel
aliases: empty
ips: 127.0.0.0/8,172.17.2.0/24 (webmail access limited to the LAN)
The most basic input file that could be used would consist of a userid followed by 11 colons per account, like the three shown below.
|
|
Explanation:
userid: all accounts have a userid constructed from
the first letter of the first name followed by at most 5 letters of
the last name, not using the infix (see 'aschur').
uid: default for all accounts; the system will assign
the next available number
pgroup: default for all accounts: the same as the userid field
gecos: the full name of the staff member, but no
'extra' fields are used
home: default for all accounts: /home/userdata/./home/users/userid
shell: /bin/bash for all accounts because all staff
members are allowed to access the school server from home (for
teleworking). This requires a real shell.
sgroups: constructed for each staff member
individually. All accounts are member of 'programs', 'teleworkers' and
'staff', all teachers are member of 'faculty'. There are also a few
'special cases' such as accounts 'acackl' and 'adumbl'.
pwd: a personal password with uppercase letters, lowercase
letters and digits
smbpwd: a personal password with only lowercase letters
skel: default for all accounts: /home/userdata/home/skeletons/skel
aliases: a single alias constructed from firstname
followed by a dot followed by infix and lastname (see 'aschur' and 'hgronb')
ips: 0.0.0.0/0 which implies unlimited access to webmail
There are no real 'tricks' to generate a file like this example in
'staff.in'; it is unfortunately a matter of sitting down and using an
editor to type in the information. However, using the
pwgen(1) tool may help you to generate more or less
complex passwords.
NOTICE:
If you have created the batch file, be sure to store it in a safe
place. After all, it contains the passwords of all staff members in an
easy readable form. It would be unwise to leave this file lying
around. The least thing you should do is to use chmod(1)
to limit the permissions to 0600 or even 0400, i.e. only accessible by
you, the owner of the file. You may even want to consider deleting the
file after you have processed it (but see the notice below).
NOTICE: If you have created a batch input file 'staff.in' you might want to keep it at least for a little while in order to be able to efficiently prepare the workstation lateron. See section 5. Inaugurating new user accounts in chapter VIII. Managing user profiles where you login once for every user, using the user's password.
|
The janitor-command can take a parameter -b followed by a
file name, which tells janitor to use the contents of the specified
file as input. Processing this batch file takes only a short while
(minutes or even tens of seconds if you have fast hardware).
You can now use the web interface to see the results of your actions. If you use Janitor, and navigate to: main menu | users and groups | modify users and groups | regular users, you see the following.
![[ status quo of regular users after processing batch file ]](janitor/janitor_add_user_batch1.png)
If you navigate to: main menu | users and groups | modify users and groups | workgroups, you see the following.
![[ status quo of workgroups after processing batch file ]](janitor/janitor_add_user_batch2.png)
Chances are that you forgot something in the batch file. There is no need to worry. You can simply edit a single user using the procedure described in section 5.5 Modifying a user account. For instance: 'acackl' is supposed to be a Janitor, but in that case she should not be a normal home directory (which will limit the account to a chrooted jail) but an advanced user with full access to the server's file system.
At this point it is not yet possible to add the teachers to their respective nests (grades) because these nests do not exist yet. However, it would have been possible to add the creation of these accounts before the creation of the accounts of staff members. Here we chose to assign the teachers to their nests manually after creating the pupil accounts via file upload (see the next section).
NOTICE:
If you have processed staff.in and then discover a
mistake, you can not correct the input file and rerun the
batch processing command. This is due to the fact that all user
accounts from the first run now exist. You can not add a user account
with a userid that already exists. You have the option to adjust the
individual accounts as discussed in section 5.5 Modifying a user
account. If you really made huge mistakes, you may want to
consider to remove the accounts and then restart with the newer and
better version of staff.in. Deleting a number of accounts
could be done one by one (see section
5.6.1 Deleting a regular user account) or using
a command line like this: janitor userdel -r acackl adumbl
hgronb aschur ... pfreir iillic. Once all the accounts are
removed you can start over with a new batch file.
Janitor is capable of processing two different file formats for upload of pupil's data: fixed record length and comma delimited. Definitions of both file formats can be customised on the fly by specifying the details in the upload dialogue (see section 5.8.2 Uploading the file with pupil's data below). The default values for the file upload can also be configured. This is done via a configuration file as explained in section 7.2 Tweaking the web interface via config.php below.
The following attributes are used to construct pupil accounts and nests (grades).
unique key/etc/passwd. (This equates to the field 'Extra 1' in
the web interface)
first nameinfixlast namegradedate of birthNOTICE: Because some standard file formats only use the last two digits of the year, the correct century is inferred by using the current date, i.e. the date on which the upload is processed. That is, if the value of the two-digit year is greater than the current year, the century is assumed to be the 20th century and thus 1900 is added to the two-digit year. If the value of the specified two-digit year is less or equal to the current (two-digit) year, the century is assumed to be the 21st century and therefore 2000 is added. This construction is based on the fact that it is highly unlikely that a pupil's date of birth will be in the future. This means that in 2005 the years '06' to '99' will be interpreted as '1906' to '1999' and years '00' to '05' will be interpreted as '2000' to '2005'. Note that all years are converted to 4-digit years internally.
NOTICE: The default file format is patterned after the so-called 'EDEX' file format (EDucational EXchange). This fixed record length format is used by many publishers of school administration software in The Netherlands to exchange pupil's data. This explains the references to the 'edex.php' module you may encounter.
NOTICE: The pupil data should not contain comma's ',' or colons ':' because these characters are used as delimiters. This applies to both the Fixed Record Length and the Comma Separated Values.
![[ upload dialogue ]](janitor/janitor_upload_pupils1.png)
Explanation:
NOTICE: You can change the defaults in this upload screen, see section 7.2 Tweaking the web interface via config.php below. The distribution defaults correspond the the EDEX format as mentioned before.
![[ after upload (part 1) ]](janitor/janitor_upload_pupils2.png)
This screen consists of two (long) tables. The first table is a list of nests-to-be. This table is labeled 'groups'. The second table contains a list of all pupil-accounts-to-be. This table is labeled 'users'.
The first table ('groups') has three columns.
ID: This is the (unique) identifier of a grade. It is used to link
pupils to nests (grades).
Groupname: This is the suggested name of the nest (grade). Note
that by default the name of the grade consists of the word 'grade'
followed by the ID in the previous column. This field can be
edited so you can change the default name into something else
('ladybirds' instead of 'grade1', 'fireflies' instead of 'grade3',
etc.).
Comments: This is the place where Janitor shows comments when
something is wrong with this particular grade.
The second table ('users') has four columns.
ID: This column shows the unique identifier of a pupil,
e.g. '00445' for pupil 'Abigail Adams'. It also shows the grade of
this pupil between parentheses, e.g. '(6)'. Note that this links the
pupil to the nest (grade) in the previous table.
UserID: This is the suggested userid that will be used for this
pupil. Note that this userid is based on the first name of the
pupil. This field can be edited.
Full Name: This is the suggested Full name of the pupil. It is
constructed using first name, infix and last name from the uploaded
file. This field can be edited.
Comments: This is the place where Janitor shows comments when
something is wrong with this particular pupil account.
The message in red ('More editing required') at the top of the screen indicates that there are some issues that need to be resolved before the accounts can be created. An example is the suggested userid 'andre marie'. This userid contains a space which is not acceptable in a userid. Therefore the record is shown with a different background colour. The following colour coding is used:
At the bottom of the page there are two buttons: [Recalculate] and [Cancel] as shown in the illustration below.
![[ after upload (part 2) ]](janitor/janitor_upload_pupils3.png)
After editing the appropriate fields ('Groupname', 'UserID' or 'Full Name') you can press the [Recalculate] button. This instructs Janitor to re-evaluate the collection of new accounts. Any conflicts that yield a 'red' background must be resolved. Issues in an 'orange' background are mere warnings but are acceptable as far as Janitor is concerned.
A solution for the name clashes might be to add a digit to the younger pupils with the same name, e.g. Mary Wollenstonecraft in grade 6 gets to get the account 'mary' whereas Mary Fields in grade 1 gets the account 'mary1'.
Another solution might be to append the first letter of the last name to the first name, e.g. William Morris in grade 7 gets 'williamm' (with two M's) and William Blake (also in grade 7) gets 'williamb'. However, this does not solve the problem completely, becau