140 Part II (Web server setup) . Running the Show Using
Monday, April 30th, 2007140 Part II . Running the Show Using sudo and Other Administrative Logins You don t hear much about other administrative logins (besides root) being used with Linux. It was a fairly common practice in UNIX systems to have several different administrative logins that allowed administrative tasks to be split among several users. For example, a person sitting near a printer could have lp permissions to move print jobs to another printer if he knew a printer wasn t working. In any case, administrative logins are available with Linux, so you may want to look into using them. Here are some examples: . lp User can control some printing features. Having a separate lp administrator allows someone other than the superuser to do such things as move or remove lp logs and print spool files. The home directory for lp is /var/spool/lpd. . mail User can work with administrative e-mail features. The mail group has group permissions to use mail files in /var/spool/mail (which is also the mail user s home directory). . uucp User owns various uucp commands (once used as the primary method for dial-up serial communications) as well as log files in /var/log/uucp, spool files in /var/spool, administrative commands (such as uuchk, uucico, uuconv, and uuxqt) in /usr/sbin, and user commands (uucp, cu, uuname, uustat, and uux) in /usr/bin. The home directory for uucp is /var/spool/uucp. . bin User owns many commands in /bin in traditional UNIX systems. This is not the case in some Linux systems (such as Red Hat and Gentoo) because root owns most executable files. The home directory of bin is /bin. . news User could do administration of Internet news services, depending on how you set permission for /var/spool/news and other news-related resources. The home directory for news is /etc/news. One way to give full or limited root privileges to any nonroot user is to set up the sudo facility, which simply entails adding the user to /etc/sudoers and defining what privilege you want that user to have. Then the user can run any command he or she is privileged to use by preceding that command with the sudo command. Here s an example of how to use the sudo facility to cause any users that are added to the wheel group to have full root privileges: 1. As the root user, edit the /etc/sudoers file by running the visudo command: # /usr/sbin/visudo By default, the file opens in vi, unless your EDITOR variable happens to be set to some other editor acceptable to visudo (for example, export EDITOR=gedit). The reason for using visudo is that the command locks the /etc/sudoers file and does some basic sanity checking of the file to ensure it s been edited correctly.
Note: In case you are looking for affordable and reliable webhost to host and run your business application check Vision ftp web hosting services