B.4 Methods for Creating Home Directories and Enabling Access to them for Samba Users

If you have previously administered Samba servers outside of an OES context, you might expect that user home directories are automatically created the first time a user logs in to Samba.

This is not the case in OES because Samba is not a PAM-enabled service. (See Services in OES Linux That Require Linux-Enabled Access in the Novell OES SP2 Planning and Implementation Guide.) Therefore, if you plan to provide Samba users with home directories, you must determine an alternate method for creating them.

The following sections briefly explain your options for creating user home directories.

B.4.1 Creating Home Directories Using iManager 2.5

If you plan to create home directories for eDirectory users on an NSS/NCP volume (the volume must exist and be mounted), and you have the NCP server installed and running (the OES default), you can create user home directories in iManager at the same time you create the user objects. (iManager cannot create home directories on traditional Linux volumes that are not also NCP volumes.)

There is one important caveat: directories created using this method are owned from a POSIX perspective by the eDirectory user who creates the user. The implications of this caveat are explained in the following sections.

NSS Volumes

POSIX ownership has no bearing on Samba access to NSS volumes because NSS controls access based on the Novell trustee model.

However, POSIX ownership is required for tracking User Quotas. Any files that are created in an NSS home directory before a user is enabled for Linux access are not counted against the user’s quota until POSIX ownership is corrected. For more information, see Setting Quotas for Users Who Were Not Initially Enabled for Linux Access (Linux) in the Novell Storage Services File System Administration Guide for OES.

NCP Volumes on Traditional Linux File Systems

POSIX ownership is an issue for Samba access when the NCP volume is defined on a traditional Linux file system. Because access to traditional Linux file systems is controlled through POSIX, users cannot access their own home directories until ownership is changed.

You can reassign directory ownership after the user is enabled for Samba by using the chown command.

For example, to change ownership of the /home/user1 directory from the Admin user to user1, you would enter

chown -R user1: /home/user1.

The -R option applies the operation recursively to all subdirectories and files.

B.4.2 Logging In to Create Home Directories

Home directories are automatically created and appropriate file access rights are automatically assigned the first time an eDirectory user who is enabled for Linux access (LUM) logs in to the OES server using PAM-enabled services, such as login, ssh, ftp, or a telnet connection. For more information, see Services in OES Linux That Require Linux-Enabled Access in the Novell OES SP2 Planning and Implementation Guide.

The simplest approach for many network administrators is to log in to the OES Linux server as the root user and use the su command at the shell prompt to create a home directory for each user, as follows:

su username exit

where username is the login name of the user for which the home directory is being created.

Alternatively, if your users access the OES server using a PAM-enabled service, you could have them log in to the server to create their own home directories.

B.4.3 Using Linux User Management Commands to Create Home Directories

You can use either the namuseradd or namusermod command with the -m option to create home directories as documented in the Novell Linux User Management Technology Guide.