How does the Ubuntu-10.10 add sudo permissions to users?

Source: Internet
Author: User
References

Http://hi.baidu.com/xiboliya/blog/item/015ead864e041b2a67096eda.html

Body

During Ubuntu-10.10 system installation, the system prompts to create a default user, for example, the user name is: xuwei. By default, this user has certain management functions, that is, the operation with root permission can be performed through the sudo command. Because ubuntu does not allow users to log on to the system as root users, this default user is the administrator in the actual sense. Now the problem is: If you create a new user: hadoop, you need to set this user to the same administrator user as xuwei. There are two ways to achieve this problem:

    1. Interface mode.Log on to the system with xuwei, choose system> System Management> users and groups, select hadoop users, and change the Account type to administrator. Restart your computer and log on to the system as a hadoop user.
    2. Command line.Use xuwei to log on to the system and open the terminal to run:
 
Sudo gedit/etc/sudoers

Modify the configuration file. The modified/etc/sudoers file contains the following content. The last line is the added hadoop User:

#/Etc/sudoers # This file must be edited with the 'usually do 'command as root. # See the man page for details on how to write a sudoers file. # defaults env_reset # host alias specification # user alias specification # Cmnd alias specification # User Privilege specificationroot all = (all) all # allow members of Group sudo to execute any command # (note that later entries override this, so you might need to move # It further down) % sudo all = (all) all ## includedir/etc/sudoers. d # Members of the Admin group may gain root privileges % admin all = (all) AllHadoop all = (all) All

Restart your computer and log on to the system as a hadoop user.

PS: Create a hadoop user and add it to the hadoop group to go to the Method

First, create a hadoop group. The command is as follows:

 
Sudo addgroup hadoop

Create a user and add it to the hadoop group just created

 
Sudo adduser -- ingroup hadoop

After executing this command, we will be prompted to enter the password. If the password is entered twice and the password is the same, the user is created successfully.

If hadoop users can use the sudo command, perform the operation as described above. I am using the second method.

 

 

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.