Sudoer Help....


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Sudoer Help....
# 1  
Old 06-05-2009
Error Sudoer Help....

Hi,

When i use command "sudo -l" under my user, it gives me the following list.

(root) NOPASSWD: /bin/chgrp
(root) NOPASSWD: /bin/chmod
(root) NOPASSWD: /bin/chown
(root) NOPASSWD: /bin/mkdir
(root) NOPASSWD: /bin/su - hubsup
(root) NOPASSWD: /bin/su hubsup
(root) NOPASSWD: /bin/vi *.conf
(root) NOPASSWD: /bin/vi *.xml
(root) NOPASSWD: /usr/bin/find
(root) NOPASSWD: /usr/bin/passwd

(hubsup) NOPASSWD: ALL

Actually I am a bit confused for "/bin/su" command access.

For the lines with "/bin/su" , what does this mean exactly ? Does this mean that, I can do "\sudo su - hubsup" OR "\sudo su -l - hubsup" i.e. switching to hubsup user , which won't ask me for any password.

Actually, I tried with "\sudo su - hubsup" OR "\sudo su -l - hubsup" , from my user account, but, I was not able to switch to "hubsup" user.

with command, "\sudo /bin/su - hubsup" , i am getting blank output on the screen. Pressing enter key, is showing "WinSCP: this is end-of-file:0
" again and again. Then, I need to press ctrl+C to come out of the execution.

Can you please help me, in understanding, what is the meaning of "(root) NOPASSWD: /bin/su - hubsup" and how I can make use of "su" command, from my user-account here. (to switch to "hubsup" user)

Please help.

Thanks and Regards,

Jitendriya Dash.
# 2  
Old 06-08-2009
??
I would say IMHO it makes no sence... and looks like you are using aliases...
I see you have a line:
Code:
(hubsup) NOPASSWD: ALL

meaning you can execute what you want "as" hubsub...
Have you tried:
Code:
/usr/local/bin/sudo -u hubsup /usr/bin/ksh

(sudo may be elsewhere on your box...)
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Linux

Syntax error in one line in sudoer file cause total failure

I have notice that when I create a sudoer file in the sudoer.d directory, then if I have a syntax error, I cannot do sudo at all, in all accounts. Why can't they change the mechanism, so it will ignore syntax error line and will only display error message but won't cause total failure and... (7 Replies)
Discussion started by: programAngel
7 Replies

2. UNIX for Advanced & Expert Users

Sudoer file - controlling parameters

Greetings all, I'm interested in knowing more about setting up the sudoers file... hope to receive some advice here. Let's say that I have 3 users, with usernames user1, user2 and user3. The following rules would apply for each user: user1 can only use the command ksh a.sh to launch... (1 Reply)
Discussion started by: rockysfr
1 Replies

3. UNIX for Advanced & Expert Users

Use of sudoer with ssh login shell script (KSH)

Greetings all, I'm in the midst of writing a login component for a series of shell scripts. What my login script does is this: 1. Prompt for username and read in username 2. Prompt for destination host and read in destination host 3. run ssh username and destination host 4. After user keys... (0 Replies)
Discussion started by: rockysfr
0 Replies

4. UNIX for Advanced & Expert Users

Another SUDOER Question...

I have my sudoers file setup to provide execution of specific directories (/a/s, /a/x, /a/d, /a/e, etc.....) I tried to list just /a/ meaning anything under /a can be executed by specific ids. However, this didn't work. Is there a way to provide rights to an entire directory structure within a... (0 Replies)
Discussion started by: scottsl
0 Replies

5. UNIX for Dummies Questions & Answers

Root privileges &Sudoer

Hi guys... how can a root assign a user all or most of the root privileges? is sudoer comand enough 4 this? thx alot.. (2 Replies)
Discussion started by: blue_7
2 Replies
Login or Register to Ask a Question