mac_g
asked on
Linux :how to provide sudo access to the user
Linux OS:
please advice the steps required to provide the sudo access to the user.
please advice the steps required to provide the sudo access to the user.
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
https://www.sudo.ws/man/1.8.17/sudoers.man.html
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.
But otherwise it is the same, just edit that file.
ASKER
Can you please provide the steps ?
There are several ways to do this and they change based on the distro you are using.
What distro are you working on?
What distro are you working on?
ASKER
Oracle Linux Server release 6.5
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
In order to resolve the below issue .. am looking to change setting.
---
[bkp@srv~]$ rpm -Uvh AvamarClient-linux-rhel4-x 86_64-7.1. 100-370.rp m
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 ??
---
[bkp@srv~]$ rpm -Uvh AvamarClient-linux-rhel4-x
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 ??
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.
ASKER
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-x 86_64-7.1. 100-370.rp m
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
can u please advice
[bkp@srv~]$ rpm -Uvh AvamarClient-linux-rhel4-x
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
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.
the backup user should run the command with sudo before it, or use su to move up to root level before executing the command.
If you are having root logins , why don't you install rpm with same.
ASKER
storage admin will take care of Installing & configure ... would be good to have other user
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