The administrator can configure the sudo command to allow a common user to execute commands in a different user identity (usually a super user) in a controllable way.
Introduction
The sudo command is similar to the su command in many aspects, but it also has some important functions.
The administrator can configure the sudo command to allow a common user to execu
#####################################################This article is from "Old boy Linux operation and maintenance training" students-xudong heIf reproduced, please be sure to keep this article link and this content copyright information.Welcome to the vast number of operations and colleagues to Exchange Linux/unix website operation and Maintenance technology!qq:345078833E-mail:[email protected]#####################################################Old boy Linux OPS training CenterTraining consult
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 a
Php uses sudo to obtain the ifconfigeth0down permission. I have already opened many posts, but I really can't achieve it. I hope you can give me some advice, even if it's materials. phpsudo's permission acquisition is actually unreliable on the oknet, I am like this: sudogedit/etc/sudo php gets the ifconfig eth0 down permission through sudo
I have already opened
1.StartPerform the recovery mode by shift or ESC
2. Select the root command line mode.
3. Execute
# Mount-O remount, RW/
This is very important because many of the materials found on the Internet are incomplete and cannot be restored successfully.
Because the recovery mode is mounted in read-only mode by default, if this statement is not executed, it will be reported
4. Execute
# Chown root: Root/usr/bin/sudo# Chmod 4755/usr/bin/
After Fedora14 is installed, sudo is not enabled by default. You should first set sudo.The role of sudo is to allow the current non-root user to directly add sudo to the command before using commands without permissions, and then enter the password of the current user to complete the function of the root user, you don't have to switch users back and forth every t
Granting sudo permissions to common users (Linux) sudo is a common tool in linux that allows common users to use superuser permissions. Add sudo before the Super User permission, for example, sudo vim/xxxxxxxxxx, and then the system prompts you to enter the password. After the password is correct, you can edit it like
sudo commandPut ("10", "amount exceeding 30,000 caps");passwd Modifying the sudo password * * * * It is not necessary to enter the password again for some time.Cd/usr/local/tomcat_xxl/webapps/root/web-inf/classes/confpasswdsudo rm-f conf.propertiesLs-lsudo mv ~/conf.properties.sudo bin/startup.sh basic commands# 160906.txt/usr/local/tomcat_xxl/webapps/root/web-inf/classes/com/xx/yy/zz/controller##
Sudo literally means that the Super user do! is one of the most important commands necessary for Linux system administrators or advanced users.Have you ever had this experience: trying to run a command in a terminal and encountering "Access Denied"? What to do? By the way, this is what you need.The command!First, ok! So here's a simple example of how to use configuration and use sudo to manage our specific
Su Switch user, switch to root user, to enter the root user's password Su-user namesudo involves the/etc/sudoers file with the following content:# User Privilege SpecificationRootall= (All:all) all# members of the admin group may gain root privileges%admin all= (All) all# Allow members of the group sudo to execute any command%sudoall= (All:all) all% indicates user groupThe system defaults to only the root user can use sudoAccount name the source of t
For the CP, it requires sudo to operate, because you do not necessarily have permissions for this file operation, you can use Cp-i to consult whether you need to overwrite directly, you can use Ls-l to view the file permissions, and for different locations when you use the CP, This will determine the relative path you are using; For example, if you are in a directory where you need dest, you can sudo the CP
Creating a normal user with the AddUser user1 command, with sudo permissions (adding the new user User1 to the sudo or root user group, or modifying the/etc/sudoer file), but still unable to execute the sudo instruction, will report the following error:sudo:/usr/lib/sudo/sudoers.so must be owned by UID 0You will need t
login, then we use SU login root account, then we must know the password to be able to log in, as follows:This will make the login successful ....sudo: is a Linux system Management Directive, a tool that allows a system administrator to let ordinary users perform some or all of the root commands, such as HALT,REBOOT,SU, and so on. This not only reduces the login and administration time of the root user, but also improves security.Under normal circums
no sudo .Question: The xxx is isn't in the sudoers file. This incident the solution to be reported.
1. Switch to the root user, how to switch it needless to say it, will not be their own Baidu to go.
2. Add Write permission to the sudo file, the command is:
chmod u+w/etc/sudoers
3. Edit Sudoers File
Vi/etc/sudoers
Find this line of root all= (all), add xxx below him all= (All) (Here's xxx is your userna
Tags: post sudo command GPO body required etc Add user passwd root userSteps1. First cut to root user2. The implementation of Visudo, in fact, is to modify/etc/sudoers3. Add users with the following rules:Youuser all=(All) all%youuser all=(All) allyouuser all =(All) Nopasswd:all%youuser all=(All) Nopasswd:all First line: Allows the user to execute the
Tags: file his sudo xxx chmod reported add/etc/toggleXXX is not in the sudoers file. This incident would be reported. Solution1. Switch to the root user,2. Add the Write permission to the sudo file, and the command is:chmod u+w/etc/sudoers3. Edit the Sudoers fileVi/etc/sudoersFind this line root all= (all) all, add the following to him xxx all= (all) all (here xxx is your user name)PS: Here you can sudoers
In linux, the su command for switching user 1 -- su USERNAME is to disable a new environment variable shell after switching the user, that is, the user's shell is still in the pre-switching state, you have the permissions of the user before the switchover. 2 -- su-USERNAME: Add "-" after the su command to enable a new variable. The Root user does not need to enter a password when switching to a common user. 3 -- sudo is to execute a command as another
sudo works as follows:1, when the user executes sudo, the system will proactively look for the/etc/sudoers file to determine if the user has permission to execute sudo2. After confirming that the user has permission to execute sudo, let the user enter the password confirmation3, if password input is successful, execute sudo
I don't know when to start using sudo. although unabletoresolvehostxxxx (XXXX is the host name) does not affect the sudo function, I feel uncomfortable every time I see sudo, then I found some information and killed it! Since it is a host
I don't know when to start. when sudo is used, unable to resolve host xxxx (XXXX
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.