Solved

Linux :how to provide sudo access to the user

Posted on 2016-07-25
13
72 Views
Last Modified: 2016-07-27
Linux OS:

please advice the steps required to provide the sudo access to the user.
0
Comment
Question by:mac_g
13 Comments
 
LVL 22

Expert Comment

by:David Atkin
Comment Utility
Hello,

There is an excellent article on how to do this here:
https://www.digitalocean.com/community/tutorials/how-to-add-delete-and-grant-sudo-privileges-to-users-on-a-debian-vps

Basically you need to login as the root user (or with root permissions) and add the user to the sudo user list:

sudo visudo
0
 
LVL 40

Expert Comment

by:omarfarid
Comment Utility
please see link below for examples, as root you can provide required priv to run certain commands to certain users:

https://www.sudo.ws/man/1.8.17/sudoers.man.html
0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
Normally it is better to use groups of which the allowed users are members of rather than add every user to the sudoers file.

But otherwise it is the same, just edit that file.
0
 

Author Comment

by:mac_g
Comment Utility
Can you please provide the steps ?
0
 
LVL 6

Expert Comment

by:David Sankovsky
Comment Utility
There are several ways to do this and they change based on the distro you are using.
What distro are you working on?
0
 

Author Comment

by:mac_g
Comment Utility
Oracle Linux Server release 6.5
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 6

Accepted Solution

by:
David Sankovsky earned 500 total points
Comment Utility
ok, what you need to do is edit teh file /etc/sudoers
Then, assuming you named you user user1, add the follwing line:

user1           ALL=(ALL)       ALL

Open in new window


You can add it under the line that reads

root           ALL=(ALL)       ALL

Open in new window


Hope that helps
0
 

Author Comment

by:mac_g
Comment Utility
In order to resolve the below issue .. am looking to change setting.

---
[bkp@srv~]$ rpm -Uvh AvamarClient-linux-rhel4-x86_64-7.1.100-370.rpm
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
--
uid=1102(testbkp) gid=0(root) groups=0(root)
--
is that correct way to alter to sudo user  ??
0
 
LVL 6

Expert Comment

by:David Sankovsky
Comment Utility
mac_g, manually changing the gid for a user is not recommended under any circumstances, please follow my instruction to provide su access to a user.
0
 

Author Comment

by:mac_g
Comment Utility
how to edit file - /etc/sudoers to give "backup" user  not to get below error when he runs below cmd.
can u please advice



[bkp@srv~]$ rpm -Uvh AvamarClient-linux-rhel4-x86_64-7.1.100-370.rpm
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
0
 
LVL 6

Expert Comment

by:David Sankovsky
Comment Utility
after you edited the sudoers file,
the backup user should run the command with sudo before it, or use su to move up to root level before executing the command.
0
 
LVL 1

Expert Comment

by:Mahesh Y
Comment Utility
If you are having root logins , why don't you install rpm with same.
0
 

Author Comment

by:mac_g
Comment Utility
storage  admin will  take care of Installing & configure  ... would be good to have other user
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now