Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ CentOS6.6 ordinary users to use sudo command to borrow root user privileges     - Swift rewrite initialize method of navigation controller class (Programming)

- RedHat Linux 6.5 Enterprise Edition installation Redis 3.0.3 (Database)

- sudoers file parsing (Linux)

- RHEL7 unattended automatic installation DHCP + TFTP + SYSLINUX + TFTP + Kickstart (Linux)

- CentOS 6.5 start ActiveMQ being given to solve (Server)

- Oracle EBS R12 for Linux installation (Database)

- AngularJS application unit testing started (Programming)

- Merge sort Java implementation (Programming)

- Installation and deployment of MariaDB under CentOS (Database)

- Modular JavaScript (Programming)

- Use SocketServer write a sockets program (Programming)

- How to upgrade Docker 1.6 on Fedora / CentOS (Server)

- Ubuntu users how to install the latest Nvidia graphics drivers (Linux)

- Android realize RippleEffect water (Programming)

- Binary tree to the next node (Programming)

- Installing software on Ubuntu: apt-get and dpkg difference (Linux)

- Android custom slideshow menu slidmenu (Programming)

- How UTorrent download the ISO image from the command line (Linux)

- Oracle RMAN-06023 and ORA-19693 errors (Database)

- CentOS 6.5 can not connect to the network under VMware (Linux)

 
         
  CentOS6.6 ordinary users to use sudo command to borrow root user privileges
     
  Add Date : 2018-11-21      
         
         
         
  First, description

Ordinary users Hadoop use: tar -xzvf ns2.35.tar.gz command to extract a file, the system prompts can not find the file, the directory can not be opened, so the thought of using the sudo command to borrow root user privileges: sudo tar -xzvf ns2.35 .tar.gz

The results suggest that: username is not in the sudoers file This incident will be reported..

Second, resolve

CentOS system installation is complete acquiescence ordinary users can not use the sudo command to borrow root with permissions, add the permissions for the user in / etc / sudoers file.

Third, step

1, in the terminal as root user login

$ Su -

Enter the root password

2, edit / etc / sudoers file, add the following command

#vi / etc / sudoers

In the root ALL = (ALL) ALL Add the following line

username ALL = (ALL) ALL

Note: The above username into your own common user name.

1.vi / etc / sudoers enter the command line mode, to edit the file, enter i, that enter the insert edit mode

2. Add more complete command, click the Esc button, then enter the command line mode

3. Then enter: wq to save and exit express, enter a colon, then enter wq

If you do not want to enter a password each time you use sudo command, which can also add the following command

username ALL = (ALL) NOPASSWD: ALL

Note: The above username into your own common user name.

Fourth, the results

You can use the command sudo tar -xzvf ns2.35.tar.gz extracting file, that root user privileges can be used by ordinary users.
     
         
         
         
  More:      
 
- Docker Basic and Advanced (Linux)
- CentOS Set the Mono environment variable (Server)
- The file name is garbled or deleted files with special characters under Linux (Linux)
- Several Methods of SSH Auto - login (Linux)
- Python 3.5 will support Async / Await Asynchronous Programming (Programming)
- How do you access Dropbox Linux command line (Linux)
- Ubuntu 14.04 installed Nvidia CUDA 7.5 and build Python Theano deep learning development environment (Linux)
- 10 useful tools for Linux users (Linux)
- Repair Maven project developed default Maven Plugin folder (Linux)
- Redis is installed in Ubuntu 14.04 (Database)
- Five Linux user space debugging tool (Linux)
- Linux find command usage summary (Linux)
- Java polymorphic methods inside constructors complete analysis (Programming)
- Oracle PL / SQL selective basis (IF CASE), (LOOP WHILE FOR) (Database)
- Oracle 11g dataguard main library backup and recovery to the test environment in one database error (Database)
- 10 example of the detection memory usage free Linux commands (Linux)
- Thinking in Java study notes - initialization and cleanup (Programming)
- How to experience Unity 8 Mir on Ubuntu 16.04 (Linux)
- Android SDK Manager can not update the domestic solutions (Linux)
- Tip: Use Cryptsetup U disk encryption (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.