17.4. Editing NIS Tables

Once your system is running as an NIS master server, you can use this Webmin module to edit records in the tables that it is serving. To see the editable tables, click on the NIS Tables icon, which will take you to a page with a menu of all tables and the contents of one displayed. Other tables can be shown by selecting one of them from the list and clicking the Edit NIS table button.

For most table types, Webmin will parse the contents of their files and display them as a table on the page, with one record per row. You can edit any record by clicking on its name in the first column, or add a new one by clicking the Add a new record link. However, some tables are in a format unknown to Webmin and so will be shown as raw text in a text box instead. If you know the correct format, the table can be manually edited and saved with the Save and Apply button. You can also switch any table to manual mode by clicking the Edit table manually link, if you prefer to work with the raw text.

The fields that exist in each record and the form for editing them are different for each type of table. The instructions below explain how to add, delete, and modify records in several frequently used tables. One commonality is that any changes will cause the NIS table to be automatically rebuilt from the changed source files, and pushed out to slave servers if configured to do so.

To create a new UNIX user for NIS clients, the steps to follow are:

1.
Select the UNIX users table from the menu and click the Edit NIS table button.

2.
Click the Add a new record link above or below the table of existing users, which will take you to the user creation form.

3.
Enter the user's name into the Username field, and an ID number for the new user into the User ID field. Unlike in the Users and Groups module, the ID will not be automatically chosen for you, so make sure it is unique.

4.
Enter the user's full name into the Real name field.

5.
Enter a home directory into the Home directory field. Unlike in the Users and Groups module, this will not be created for you and files will not be copied into it.

6.
Select a shell from the Shell menu, or select the Other option and enter the path to the shell program into the field below.

7.
Select the Normal password option for the Password field, and enter the new user's password into the text field next to it.

8.
Enter the numeric ID of the user's group into the Primary group ID field.

9.
If the shadow NIS table is enabled, you can set the optional Expiry date, Minimum days, Maximum days, Warning days, and Inactive days fields. These all have the same meanings as in the Users and Groups module, covered in Chapter 4.

10.
When done, click the Create button to have the new user added to the table.

Existing UNIX users can be edited by clicking on their names in the table, which will take you to an editing form with all the same fields as described above. Change any of the fields, and click the Save button—or to delete the user, click the Delete button at the bottom of the form. When deleting, the user's home directory will not be touched, so you may need to delete it manually.

To create a new UNIX group in NIS, the process is as follows:

1.
Select the UNIX groups table from the menu and click the Edit NIS table button.

2.
Click the Add a new record link above or below the table of existing groups, which will take you to the user creation form.

3.
Enter a name for the new group into the Group name field, and a numeric ID into the Group ID field. Make sure that the ID is not used by any other existing group.

4.
The Password field can be left untouched, as group passwords are almost never used.

5.
Fill in the Group members field with the usernames of users who will be members of the group, one per line.

6.
When done, click the Create button to have the new group added to the table.

As with users, you can edit a group at any time by clicking on its name from the table, which will take you to an editing form. Make any changes that you want, and click the Save button to save them—or use the Delete button to remove the group. Note that no checking will be done to see if it is the primary group of any existing users.

As the instructions for editing users and groups show, the process for editing any of the supported tables is quite similar. Currently, you can edit UNIX users, UNIX groups, Host addresses, Networks, Services, Protocols, Netgroups, Ethernet addresses, RPC programs, Netmasks and Aliases using forms in Webmin. All other tables must be edited manually.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.91.252