Next Previous Contents

3. The dialog

The module has a single dialog to handle the process. Here is a description of every field.

3.1 Configuration name

If you update the account database from a given file, you may want to remember what you did and the options you selected. Enter a configuration name (a single word, no space), fill the other field and hit the "save configuration" button.

Later, when you visit the dialog, click on the help list button (right next to the field) and pick the configuration name. The dialog will reload itself with the configuration you saved.

3.2 Data file path

There are zillions of database out there and Linuxconf can't hope to understand them all. Instead, Linuxconf expects a tab delimited file containing five fields per line. Most database tool can export using such a format. The five fields are:

3.3 Data command

If your database does not contain all the five fields required, you may write a script (a program) to do the translation and fill the missing information. This script may be written to simply output the result on the screen. You can specify the path and argument to this script and the module will grab the output on the fly.

Using this strategy, there is no need to produce an intermediate file: The accountbatch module execute the command, which extract the information from some database and the module process the output on the fly.

The "data command" can't be used with the "data file path". Use one or the other.

3.4 Operate on group above

The Linux account database (/etc/passwd) contains several special user accounts. For schools, it may also contain accounts for teachers, technicians and so on. You external database may be only authoritative for a subset of the Linux accounts (the students).

When enabling the "Delete old accounts" check box, this field (operate on group above) is the key to limit the scope of the process. Every Linux account not found in the data file (or produced by the data command) will be deleted, if and only if, the account group id is greater or equal to the group specified here.

Note that using this field is seldom practical. In general, one prefer to update accounts member of few specific group.

3.5 Operate only on groups

Instead of limiting the scope of the deletion process (explained above) to group above a certain threshold, you can enumerate the group on which the process must operate. Any user account not member of those groups won't be deleted, even if it is not part of the data file.

3.6 Controlling the operation

The module may be used to perform 3 tasks. You can select which one you want independently using 3 check boxes.

Add missing accounts

Any account not found in the Linux account database will be added if this check-box is selected.

Update existing account password

Existing account will be update using the password found in the datafile. This can be useful at the start of a school session, to reset all account to a known password. The students may have forgotten it during the summer.

Delete old accounts

Any Linux account not found in the data file, member of one of the specified group, or with a group id above a given threshold will be deleted.

Deletion mode

You may want to preserve the data owned by the account you are deleting. Or you may want to delete it or archive it. You can select the behavior. The account data is the home directory and the mail in-box folder.

Archiving is done by moving all the data in a compress tar file, located in the oldaccounts directory. The directory is created as needed in the same directory holding the home of the user account.

Archiving is probably the recommend practice. You may want to clean the oldaccounts directory a couple month later, just in case the user come back to retrieve some personal documents.

3.7 Test

The test button produce a report of the action done. It will tell you which account would be added, deleted and updated. It is a good idea to experiment with the module using this button to make sure you understand its behavior. Having a good backup of the system is not a bad idea either :-)

3.8 Accept

Once you are satisfied, after using the test button a couple time, you hit the accept button. Then the real processing goes on. A pop-up window shows up, with completion bar. Each one shows the progress of the three operation (add, delete, update).

Note that archiving an account may be a fairly slow process. So if you delete many accounts, you may take a coffee ... or two.


Next Previous Contents