Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
Search for and remove .rhosts files by using the find(1) command.
# find home-directories -name .rhosts -print -exec rm {} \; |
Identifies the path to a directory where users' home directories are located. Note that you can enter multiple paths to search more than one home directory at a time.
Identifies the file name.
Prints the current path name.
Tells the find command to apply the rm command to all files that are identified by using the matching file name.
The find command starts at the designated directory and searches for any file that is named .rhosts. If it finds such as file, find prints the path on the screen and removes it.
The following example searches and removes .rhosts files in all the user's home directories that are located in the /export/home directory.
# find /export/home -name .rhosts -print | xargs -i -t rm {} \; |