[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

need to add a new user to sudo

Posted on 2014-04-24
4
Medium Priority
?
498 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 1000 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 1000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month20 days, 13 hours left to enroll

865 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