Solved

need to add a new user to sudo

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

758 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

19 Experts available now in Live!

Get 1:1 Help Now