LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-14-2011, 02:02 PM   #1
ranjit rajput
LQ Newbie
 
Registered: Jul 2010
Location: Mumbai,India
Posts: 7

Rep: Reputation: 0
Question Sudo access requirement


Hi All,

I am facing following problem.
We are having 2 user named jzappa and imany.
right now jzappa have sudo access but we have to remove it now.imany have sudo access.

Now user need to able to 'su' to imany from jzappa and then to 'sudo su' to root from imany.

How to make entry in /etc/sudoers files.

Ranjit Rajput
 
Old 12-14-2011, 02:10 PM   #2
qwertyomen
LQ Newbie
 
Registered: Dec 2011
Distribution: ubuntu
Posts: 7

Rep: Reputation: Disabled
I'm not certain what your trying to do here... do you want sudo privileges without a password? are you trying to get each account sudo privileges?
 
Old 12-14-2011, 02:29 PM   #3
ranjit rajput
LQ Newbie
 
Registered: Jul 2010
Location: Mumbai,India
Posts: 7

Original Poster
Rep: Reputation: 0
Question Sudo access

Thanks...

i want 1)jzappa user only able to su to imany user.2)imany user is able to sudo su to root.

how to make entry in /etc/sudoers ?

Ranjit
 
Old 12-14-2011, 02:50 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,699

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by ranjit rajput View Post
Thanks...
i want 1)jzappa user only able to su to imany user.2)imany user is able to sudo su to root. how to make entry in /etc/sudoers ?
In the scenario you described, why bother??

If the jzappa users logs in, and can su to imany, and from THERE, get root access, they can easily edit anything they want, including the sudoers file. What you're describing is pointless. I suggest you read the sudoers manual, and see any of the examples you can find online.

http://www.gratisoft.us/sudo/sudoers.man.html
http://serverfault.com/questions/367...users-commands

You can put
Code:
User_Alias RESUSER = jzappa
RESUSER ALL = !/usr/bin/su, !SHELLS, <any other commands you don't want them to run>, /bin/su imany
and jzappa will only be able to su to imany. Based on your other posts, you never follow up or answer questions, so I'm not sure what you'll do with this.
 
1 members found this post helpful.
Old 12-14-2011, 03:50 PM   #5
ranjit rajput
LQ Newbie
 
Registered: Jul 2010
Location: Mumbai,India
Posts: 7

Original Poster
Rep: Reputation: 0
Hi

after putting below, it is asking for password for imany.I dont want that when i switch from

jzappa to imany it dont ask for password.

User_Alias RESUSER = jzappa
RESUSER ALL = NOPASSWD: !/usr/bin/su,/bin/su imany

Kindly suggest.
 
Old 12-14-2011, 04:22 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,699

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by ranjit rajput View Post
Hi
after putting below, it is asking for password for imany.I dont want that when i switch from jzappa to imany it dont ask for password.

User_Alias RESUSER = jzappa
RESUSER ALL = NOPASSWD: !/usr/bin/su,/bin/su imany

Kindly suggest.
Ok...again, I'll 'kindly suggest' you read the sudoers manual. If your user is set up to authenticate as part of a group, then no matter what you specify in the command alias group, they'll still have to. You don't post your sudoers file, so it's hard to say. And again, what you are doing is pointless. If the user can become root via another user ID, they're totally bypassing what sudo is for, and can do whatever they want.
 
  


Reply

Tags
sudo



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo access denied ZAMO Linux - Server 5 03-21-2010 05:48 PM
NISPOM audit requirement "failed access to objects" won't work-RHEL5 update1 p3t0rt Red Hat 1 05-14-2009 11:36 AM
Sudo Access PMP Linux - Newbie 7 05-04-2009 07:19 AM
sudo access depam Linux - Newbie 1 02-03-2008 06:56 AM
How to use sudo access in GUI Rustylinux Linux - Newbie 17 01-04-2008 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration