Use of the sudo service in linux RHEL6

Source: Internet
Author: User

/Bin/The commands for the decentralized binary files can be used by common users.

SbinThe commands for the delegated binary files are root users.Available

 

Ordinary users also want to use SbinYou can use sudoTo achieve:

By default, common users are not allowed to use it:

Tip: insufficient Permissions

 

Configure a single user to have the right to use a command or service

The default system frozen software package has been installed. You can view the following:

Run

[Root @ localhost ~] # MongodoTo generate sudoConfiguration file.

 

Add:

Note: grant redhatLocal users can use chkconfigCommand to write the domain name.

Note: The added command must be an absolute path.

You can also change it to the following:

View iptablesIn those modes, boot starts by default:

Note: The graphical function is enabled by default. We will disable it.

We execute sudo under normal users.Command

 

 

We modify iptables.By default, services are not enabled for graphical boot,

 

Note: When executing a command, you must add sudo.

After comparison:

Configure the Service Group and user group as follows: (use of aliases)

Note: STUDENTThis user group contains redhat, WestosUser

 

 

 

Note: SERVICEThis service group contains the above services, STUDENTUser GroupAll services of the Service Group are fully used, and no password is required.

 

Configure a user to have the right to use a service group:

Note: The service alias should not conflict with the system. I have tried to use it.SERVICEThis alias will still allow you to enter the password when starting the service.

UseWESTOSAliasOK:

Use an alias that conflicts with the system:

Tip:RedhatPassword. So do not conflict with the system.

 

Configure the existing groups in the system to have the right to use a service:

Note: If a group exists in the system, use lower-case letters. If not, use upper-case letters.

First addAdminGroup, group memberRedhat

Only allowAdminGroup PairFtpThe Service has the right to use. Other servicesNo

Note: you must first%If not configuredSudoFile, it does not report errors, the service can also start, but requires a password.

 

Note: StartFtpok, StartApacheService. Sorry,RedhatOnlyFtpService, the configuration file cannot be foundRedhatUsers can useHttpdService.

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.