Solved

need to add a new user to sudo

Posted on 2014-04-24
4
484 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

777 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