Host_Alias DBAPP = server8,server12,server15 RunasAlias DBAPP = dbuser,operator

Host_Alias DBAPP = server8,server12,server15 RunasAlias DBAPP = dbuser,operator User_Alias DBAPP = chris,mwlucas DBAPP DBAPP = (DBAPP) DBAPP If you do this, anyone who has to debug with your sudo(8) configuration will curse your name at great length. Even if you consider being cursed as a job perk, things like this tend to result in phone calls during the middle of whatever scant hours the senior sysadmin is permitted to sleep in. Using Sudo Now that you understand how sudo permissions are set, let’s look at how to actually use sudo. Tell sudo that your account has privileges to run any command. (Because any readers of This Blog should already have root on at least one system preferably their OpenBSD test box this won’t be a security issue.) Sudo and Passwords The first time you run sudo(8), it will prompt you for a password. Enter the password for your own account, not the root password. If you give an incorrect password, sudo will insult your typing abilities, mental facilities, or ancestry, and let you try again. After three incorrect passwords, sudo gives up on you. You’ll have to re-enter the command you want to run. Once you enter a correct password, sudo(8) records the time. If you run sudo(8) again within five minutes, it won’t ask you for a password. After you don’t use sudo for five minutes, however, you must re-authenticate. This makes work easier when you’re issuing a series of commands under sudo, but times out reasonably quickly in case you walk away from the computer. Checking Sudo Permissions When you’re a user on a system with sudo, one thing you’ll probably want to know is what commands the systems administrator has permitted you to run. Sudo’s -l flag will tell you this: # sudo -l Password: User mwlucas may run the following commands on this host: (root) ALL # If you had tighter restrictions, they would be displayed. Running Commands Under Sudo To run commands via sudo, just put the word “sudo” before the command you actually want to run. For example, here’s how you would become a root by using su via sudo: # sudo su Password: # Using sudo(8) to become root simply allows the senior sysadmin keep the root password a closely held secret. This isn’t entirely useful, as with unrestricted sudo access junior administrators can change the root password. Still, it’s a start toward keeping the system more secure. You can run more complicated commands under sudo(8), with all of their regular arguments. For example, “tail -f” is excellent to view the end of a log file, and to have new log entries appear on the end Page 155
Note: If you are looking for good and quality webspace to host and run your java application check Actions java hosting services

Comments are closed.