Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Editing the configuration files

About this section  Top

This section describes how to edit the passwd and group files. For information about the netgroup and shadow files, see the na_netgroup(5) and na_shadow(5) man pages.

Editing restrictions  Top

You cannot edit the contents of configuration files from the console of your filer because Data ONTAP does not have a text editor. You need to edit the configuration files from a UNIX/NFS or Windows/CIFS client.

When editing the configuration files, you must follow the specific format required for each file for each entry.

Procedures for editing the passwd file  Top

The procedure you use to add entries to the /etc/passwd file depends on whether you are using the /etc/passwd file or either a Windows NT domain controller, NIS, or an LDAP server to authenticate users:

Adding entries to the passwd file with passwords  Top

In this procedure, you add entries to the passwd file using a text editor on a UNIX host, and then transfer the file to the filer. You add entries to the passwd file on a UNIX host because each entry in the file requires an encrypted password and Data ONTAP does not have a command for creating passwords. The format for entries in the passwd file is as follows:

username:password:uid:gid:full name:/:default shell

To add entries to the passwd file, complete the following steps.

Step

Action

1

Log in to a UNIX host as the root user.

2

Change to the /etc directory.

3

Make a copy of the existing passwd file under a new name, such as passwd.old.

Note
It is important that you make a copy of the passwd file before editing it so that you can restore the original passwd file on this UNIX host after you have created a file that you will use on the filer.

4

If you have a passwd file on your filer that...

Then...

Contains only the default entry

Go to Step 5.

Contains entries in addition to the default

Copy this file from the filer to the UNIX host in the /etc directory.

This action overwrites the passwd file that exists in the /etc directory on the UNIX host.

5

Use a text editor to open the passwd file on the UNIX host.

6

Add entries to the passwd file using the format shown in Adding entries to the passwd file with passwords.

Leave the password and default shell fields empty. You set passwords in Step 8. Data ONTAP does not use the default shell field.

Note
Data ONTAP requires that the passwd file be terminated with a carriage return. Insert a carriage return after the last entry if none exists.

7

Save the file and exit the text editor.

8

Set a password for each user by entering the following command after the UNIX host command prompt:

passwd username

username is the user name of the user you added in Step 6.

The passwd program prompts you to enter the new password twice.

9

Copy the passwd file from the UNIX host to the /etc directory on the filer.

10

Delete the passwd file from the UNIX host and give the copied file (passwd.old) the new name, passwd.

Deleting entries in the passwd file with passwords  Top

In this procedure, you delete from the passwd file, the entries of users to whom you want to deny access.

To delete entries from the passwd file, complete the following steps.

Step

Action

1

Use a text editor to open the /etc/passwd file on the filer.

2

Delete the entry for each user to whom you want to deny access.

3

Save the file and exit the text editor.

Editing entries in the passwd file without passwords  Top

In this procedure, you edit the passwd file from a Windows PC or a UNIX/NFS client, using a text editor. You do not need to encrypt a password, because a domain controller or NIS authenticates users. The format for entries in the passwd file is as follows:

username:password:gid:uid:full name:default shell

To edit entries in the passwd file, complete the following steps.

Step

Action

1

Use a text editor to open the /etc/passwd file on the filer.

2

Add an entry for each user who needs to access files.

Leave the password and default shell fields empty. Data ONTAP does not use them when users are authenticated by a Windows NT domain controller, NIS, or an LDAP server.

Note
Data ONTAP requires that the passwd file be terminated with a carriage return. Insert a carriage return after the last entry if none exists.

3

Save the file and exit the text editor.

Editing the group file  Top

In this procedure, you edit the group file from either a Windows workstation or a UNIX/NFS client using a text editor. The format for entries in the group file is as follows:

groupname::gid:username,...,username

To edit the group file, complete the following steps.

Step

Action

1

Make sure that you are connected to the root filer volume.

2

Use a text editor to open the /etc/group file.

3

If...

Then...

You want to add a group

Add an entry for the group for which you want to authorize access using the format shown above.

Note
Data ONTAP requires that the group file be terminated with a carriage return. Insert a carriage return after the last entry if none exists.

You want to delete a group

Delete the entry for the group.

4

Save the file and exit the text editor.

Result:

The passwd and group files on the filer now contain entries for users and groups. Data ONTAP can verify users' rights to access the filer.

Note
There is no upper limit to the number of entries in the /etc/group file. Any one user, however, can belong to only 32 groups.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments