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 Base info

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:

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.

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.

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.3 Parsing

The module expect either a file, or the output of a command with a specific format. It expects one line per record. The TAB character is used as the field separator. We often have an almost suitable file: Important fields are available, some are missing and the order is wrong. In this section, we can fixe some problems.

For every expected field, we can specify its column position in the file. For example, the "user id" field is normally expected as the first column of the file. We can set a different column.

For every field, we can select the "Not supplied" value. The value will be taken from the "Defaults" text field. All user account created will share the same value for this field.

User ID

The is the login identificator.

User ID prefix

Sometime, we have a user account list where user ID are simply numbers. Many linux applications expect a user ID to start with a letter. We can specify a prefix

Password

You specify here which column contains the password. "Not supplied" means that the default value will be used. An empty default value means no password (the account is disabled). "generate" means the module will invent a password and produce a list of password assignments.

3.4 Task

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.5 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.6 Preview

The preview button displays the first 20 account lines. It allows you to check the parsing of the input file and see if each field as been properly identified.

3.7 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