星期五, 一月 09, 2009

RHCE Prerequisites-0109

Shells

Their default environment variables' values are shown in the output to the env command.

echo $PATH

add the /sbin directory to your PATH
PATH=$PATH:/sbin
export PATH

Every time you create a new file, the default permissions are based on the value of umask.
In the past, if the value of umask is 022, the default permissions for any file created by that user is 777-022, but Now 666-022, as new files can no longer get executeable permissions

When you type the umask command, you get a four-number output such as 0245. As of this writing, the first number in the umask output is always 0 and is not used. In the future, this first number may be usable to allow for new files that automatically include the SUID or SGID bits.

SUID and SGID

Shadow Password Suite
Historically, all that was needed to manage Linux users and groups was the information included in the /etc/passwd and /etc/group files. These files included passwords and are by default readable by all users.

The Shadow Password Suite was created to provide an additional layer of protection. It is used to encrypt user and group passwords in shadow files (/etc/ shadow and /etc/gshadow) that are readable only by users with root privileges.

THE Superuser


su The superuser command, su, prompts you for the root password before logging you in with root privileges.

sudo The sudo command allows users listed in /etc/sudoers to run administrative commands. You can configure /etc/sudoers to set limits on the root privileges granted to a specific user.

Red Hat Enterprise Linux provides some features that make working as root somewhat safer. For example, logins using the ftp and telnet commands to remote computers are disabled by default.

/etc/skel for Home Directories
Basic configuration files(hidden) for individual users are available in the /etc/skel directory.
If you want all future users to get specific files in their home directories, include them here.

Red Hat Enterprise Linux provides an easy way to control network service daemons through the scripts in /etc/rc.d/init.d. The actual daemon itself is usually located in the /sbin or /usr/sbin directory.

/etc/init.d/httpd restart