Problem solve Get help with specific problems with your technologies, process and projects.

Solaris Web services security: Force the use of su to gain root access

Learn to configure a secure Solaris-based Web Services host!

To enhance audit of root access, direct logon should be denied for the root account. It is recommended using only the su command to gain root privileges.

A word of warning: before you do this, make sure there is at least one active user account you can use to log in. If there isn't one active user account, you'll have to boot using the CDROM and undo the following step to regain root access.

To prevent direct login of the root account, edit the file /etc/default/login.

Look for the line CONSOLE=/dev/console. This line may be commented out. Make sure there is an uncommented version of this line that reads:

Restrict root's Search Path

To prevent the execution of Trojanized copy of utilities such as ls and ps hackers may have placed in a hacked directory structure, restrict root's search path to directories root owns, i.e., /sbin, /usr/bin and /usr/sbin. Edit root's .cshrc, .profile, and .login and remove the current directory specification (.) and restrict root's PATH to the above directories.

Set root's File Mask

Root's umask should be set to 077 or 027. Add the following entry in root's .profile or .cshrc:
umask 077

When this is done, all files or directories created by root will have rwx------ for 077 or rwxr-x--- for 027 file mask.

In this 12-part tip Unix expert Gary Smith breaks down the process of building and maintaining a highly secure Web services architecture on the Solaris platform.

Table of contents:
Part 1: Isolate the Web services host server
Part 2: Install and configure a very basic operating system
Part 3: Force the use of su to gain root access
Part 4: Disable trusted host relationships and create a warning banner
Part 5: Configuring user accounts
Part 6: Disabling and removing unnecessary accounts
Part 7: Configure network access control
Part 8: Configure network services
Part 9: Install OpenSSH, disable NFS and reboot
Part 10: Set file permissions
Part 11: Test the configuration
Part 12: Conclusion

This was last published in October 2002

Dig Deeper on Web application and API security best practices

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.