Solved

need to add a new user to sudo

Posted on 2014-04-24
4
487 Views
Last Modified: 2014-05-03
My sudo looks like this

##
# User Alias Entries
User_Alias ADMIN = root, h10267, h82683, h80613, h103881 , h31119

##
# Override built-in defaults
Defaults syslog=auth
Defaults:ADMIN !lecture

ADMIN ALL = NOPASSWD: ALL
ucmdb ALL= NOPASSWD: /usr/local/sbin/ucmdb.exe, /bin/cat, /bin/ls
edmz ALL= NOPASSWD:/bin/grep, /usr/bin/passwd

i need to add the user h31119 to sudo file with the following rights :

sudo acces to pidadm and piqadm for h31119

pidadm and piqadm are folders at /usr

any help would be appreciated
0
Comment
Question by:c_hockland
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 250 total points
ID: 40026155
Other question is a duplicate, so please delete it.

sudo is to get you access as a super user or some other user or commands that need root access.  What you are trying to do is getting access to certain folders.  It is not a sudo related issue.  You need access permissions /ACLs, etc. to do accomplish this.
0
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 40026159
The user "h31119" is in ADMIN, and ADMIN has all sudo access already.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 40026165
Rightly pointed out.  So you need to issue command like


sudo cd /usr/pidadm

Open in new window



But you should not use sudo for this.  You should allow access like:

setfacl -m u:h31119:rx /usr/{pidadm,piqadm}

Open in new window


This is the right way to handle your problem.
0
 
LVL 13

Assisted Solution

by:Sandy
Sandy earned 250 total points
ID: 40026892
yes, ADMIN has all the rights..  are you facing any issue or error ?

if yes, Please paste it out here...

TY/SA
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
lunix and unix command 21 120
Using sort and uniq to pare down large syslog 6 77
LogmeIn using Linux Ubuntu 16.04 6 116
Samba 4, Users Permission, 5 67
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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