Tuesday, January 6, 2009

Using the root Login

The root user has complete control of the operation of your Red Hat Linux system. That user can open any file or run any program. The root user also installs applications and adds accounts for other people who use the system.
When you first install Red Hat Linux, you should have added a password for the root user. You need to remember and protect this password. You will need it to log in as root or to obtain root permission while you are logged in as some other user. The home directory for the root user is /root. That and other information associated with the root user account is located in the /etc/passwd file. Here is what the root entry looks like in the /etc/passwd file:
root:x:0:0:root:/root:/bin/bash
This shows that for the user named root, the user ID is set to 0 (root user), the group ID is set to 0 (root group), the home directory is /root, and the shell for that user is /bin/bash. You can change the home directory or the shell used, if you like, by simply editing the values in this file.
Aliases for the rm, cp, and mv commands allow those commands to be run with the −i option. This prevents massive numbers of files being removed, copied, or moved by mistake. The −i option causes each deletion, copy, or move to prompt you before the actual change is made.

No comments:

Post a Comment