B.15 nsschown

Use this utility to change and list the owners of the NSS files and directories, to identify the files and directories that have obsolete owners, and to list or change the files owned by a owners in a directory or volume level. It is available from Novell Open Enterprise Server 11 SP2 onwards.

NOTE:This utility does not support DFS Junctions, DST and POSIX NCP volumes.

B.15.1 Syntax

nsschown -l <path> -r <yes/no> {-g <oldGUID> |-u <olduserFDN> | -a | -i [-b <bind_FDN>] [-p <password>]} [-n <newuserFDN>]

NOTE:nsschown utility does not support paths containing *.

B.15.2 Options

Usage Options

-l <path>

To list or replace the ownership of a specified directory.

-r <yes/no>

To list or replace the ownership of the specified directory, the files and sub-directories. The default is yes and that will list or replace the entire directory. If set to no, it will list or replace only the specified directory or file.

-g <oldGUID>

To list or replace all the files and directories with a specified owner GUID.

-u <Old_User_FDN>

To list or replace all the files and directories with a specified owner. The owner can be a fully qualified FDN or root.

-a

To list or replace all the files and directories irrespective of the current owner.

-i

To list or replace all the files and directories having invalid owner IDs.

-b <Bind_FDN>

Provide a user FDN that has browse rights at root tree level. This user will be used to login to the eDirectory tree for doing a tree-wide lookup for owner GUIDs. By default, [Public] has browse tree right. User FDN and password must be provided if [Public] does not have browse tree rights.

-p <password>

Provide the appropriate user FDN password for the eDirectory login. Failing which you will be prompted to provide a password.

-n <new_user_FDN>

To replace the ownership of all the files or directories found with the new user. It can be FDN or root.

Examples

  • To list the owners of all files and directories under the directory named “dir”:

    nsschown -l CVOL:dir -a

  • To replace owners of all files and directories under “CVOL:dir” that have owner GUID as “1234567a-7834-0000-00-12-123456781234” with the user “.newuser.context.tree.”. This includes all files and sub-directories under the “dir” directory.

    nsschown -l CVOL:dir -g 1234567a-7834-0000-00-12-123456781234 -n .newuser.context.tree.

  • To replace the ownership of “CVOL:dir” alone with the new user “.newuser.context.tree.”.

    nsschown -l CVOL:dir -r no -a -n .newuser.context.tree.

  • To list all files and directories under “CVOL:dir” that have invalid owners, and the eDirectory login credentials used to valid the owners are “.loginuser.context.tree.” and “password123”.

    nsschown -l CVOL:dir -i -b .loginuser.context.tree. -p password123