Chapter 4 . Learning Basic Administration 141 If (Free php web host)

Chapter 4 . Learning Basic Administration 141 If you are stuck here, refer to the vi tutorial in Chapter 2 for information on using the vi editor. 2. Uncomment the following line to allow users in the wheel group to have full root privileges on the computer: %wheel ALL=(ALL) ALL This line causes each user to provide a password to be allowed to use administrative commands. To allow users in the wheel group to have that privilege without using a password, uncomment the following line instead: %wheel ALL=(ALL) NOPASSWD: ALL 3. Save the changes to the /etc/sudoers file (in vi, type ZZ). 4. Still as root user, open the /etc/group file in any text editor and add to the wheel line any users you want to have root privilege. For example, if you were to add the users mary and jake to the wheel group, the line would appear as follows: wheel:x:10:root,mary,jake Now users mary and jake can run the sudo command to run commands, or parts of commands, that are normally restricted to the root user. The following is an example of a session by the user jake after he has been assigned sudo privileges: [jake]$ sudo umount /mnt/win We trust you have received the usual lecture from the local System Administrator. It usually boils down to these two things: #1) Respect the privacy of others. #2) Think before you type. Password: ********* [jake]$ umount /mnt/win mount: only root can mount /dev/hda1 on /mnt/win [jake]$ sudo umount /mnt/win [jake]$ In this session, the user jake runs the sudo command to unmount the /mnt/win file system (using the umount command). He is given a warning and asked to provide his password (this is jake s password, not the root password). Even after jake has given the password, he must still use the sudo command to run subsequent administrative commands as root (the umount fails, but the sudo umount succeeds). Notice that he is not prompted for a password for the second sudo. That s because after entering his password successfully, he can enter as many sudo commands as he wants for the next five minutes without having to enter it again. (You can change the timeout value from five minutes to however long you want by setting the passwd_timeout value in the /etc/sudoers file.) Note
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision shared web hosting services

Leave a Reply