Friday, March 18, 2011

Use sudo reinforcement Linux system security

II. detailed description of the use of Sudo Sudo command parameters, we can let a user as root to execute some commands, you can let him as another user to execute some commands — this is especially useful for system administration.

Sudo command specific configuration can be found in the file/etc/sudoers the document provides a command can be executed for a specific user. Prerequisites for using sudo is that users must have their own user name and password. If a user attempts to run through the sudo command, but the user did not located in the sudoers file, the system will automatically send the admin an email stating that non-authorized users are accessing the system. As mentioned earlier, because the function has a ticket, sudo user login sudo, issued him a piece of paper, by default the effective duration of five minutes. However, users can also sign with-v sudo command to update bills, this will apply for another five minutes of negotiable instruments. The command looks like this: sudo-v If you have an unauthorized user to run above command, the administrator will receive an email to reflect the event e-mail messages. At the same time, the mark-v can also be notified of non-authorized user, who is an illegal user. If the user is stubborn, and again enter the sudo command, the system will then send you an e-mail message to notify the administrator. Regardless of the logon attempt is successful, Sudo will be recorded into the default syslog (3) files. However, we also can Sudo's configuration file to change this behavior. The following table gives the sudo command options. Option option name description-VVersion print version number and exit. -Help print help message and exit. -LList lists all current user to allow and ban command. -The user's notes vValidate updated to a preconfigured amount of time, the default is five minutes. If necessary, the user must enter the user password again. -Set aside that user kKill. Implementation of this option will command the user reenter the user password to update the ticket. -Completely removed the user KSurekill. After you run this option, users must use their username and password to sign in. -UUser as user name provided by the user to run specific commands. The user name provided by the user can be any user other than root. If you want to import a uid, entry # uid instead of the username. If you want to use uid, can be used to replace the username uid #.

No comments:

Post a Comment