126

Changing the Owner

Use the chown tool to change the owner of a file or folder.

$ chown username fileorfolder

Parameter

Description

username

The user who will become the owner of the file.

 

 

fileorfolder

The name of the file or folder to change.

 

 

To change the owner of file1 to the user jdoe:

$ chown jdoe file1

See the chown man page for more information.

Changing the Group

Use the chgrp tool to change the group of a file or folder.

$ chgrp groupname fileorfolder

Parameter

Description

groupname

The group that will become associated with the file or folder.

 

 

fileorfolder

The name of the file or folder to change.

 

 

To change the group of file1 and file2 to the group ateam:

$ chgrp ateam file1 file2

See the chgrp man page for more information.

Securing System Accounts

Security is very important when setting up and administering system accounts. The following sections cover security settings for user accounts.

Securing Initial System Accounts

Two accounts on the computer require attention before any further configuration is done. First, the permissions on the home folder of the initial administrator account should be changed. Second, any necessary modifications to the root account should be performed. To secure initial system accounts, the permissions on the home folder of the initial administrator account should be changed to allow only administrator access.

The permissions on the home folder of the just-created administrator account allow any user who logs in to the computer to browse its contents.

To change permissions on the administrator’s home folder:

$ chmod 700 /Users/adminname

where adminname is the name of the account. The 700 permission setting allows only the administrator to read and browse files in his home folder.

Chapter 8 Working with Users and Groups

Page 126
Image 126
Apple Mac OS X Server Securing System Accounts, Changing the Owner, Changing the Group, Securing Initial System Accounts