Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
su -c <command> without password?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
stikboy
n00b
n00b


Joined: 14 Sep 2003
Posts: 68
Location: Colorado

PostPosted: Sun Oct 24, 2004 8:44 am    Post subject: su -c <command> without password? Reply with quote

Is it possible to disable asking for root's password for only certain things? I would like to be able to add:
su -c dvdstyler
su -c k3b
to my fluxbox menu and have them start without needing the password. I would use sudo, but growisofs does not like sudo :) and I don't want to disable it for everything for obvious security issues
Back to top
View user's profile Send private message
DislexiK
n00b
n00b


Joined: 09 Nov 2003
Posts: 72
Location: /home/dislexik

PostPosted: Sun Oct 24, 2004 9:16 am    Post subject: Reply with quote

stikboy,

You can use suauth to do kind of the thing you want to do, it allows you to limit who can SU and who they can SU to, it also allows you to let them SU with or without a password, or to SU with there password :)

The basics are:

create the file /etc/suauth with:

<UID To SU To>:<UID To SU From>:ACTIONS

For your example:

<root>:<username>:<NOPASS>

# man suauth

for more detils

Regards

DislexiK
_________________
DislexiK DoT KoM - A Click Start To Becoming A GeeK
Linux, Networking, Hardware and Programming
Forum and Articles Dedicated to helping all types of experienced users
Back to top
View user's profile Send private message
stikboy
n00b
n00b


Joined: 14 Sep 2003
Posts: 68
Location: Colorado

PostPosted: Sun Oct 24, 2004 9:36 am    Post subject: Reply with quote

Thanks for the reply:) I didn't know about suauth

That will work, but it does only limit by user, and not user/app being run, which was what I'm looking for (trying to remain as secure as possible) but since it's my pc and no one else has access, I could settle for this if no one has any way to limit by commands like sudo
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20589

PostPosted: Sun Oct 24, 2004 4:21 pm    Post subject: Reply with quote

Moved from Other Things Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
outspoken
Guru
Guru


Joined: 14 Feb 2004
Posts: 464
Location: orlando, fl

PostPosted: Wed Nov 17, 2004 3:35 am    Post subject: Reply with quote

what is the difference between sudo and suauth? ive always used sudo for such things. (like k3b since now root it required to burn)

so in my fluxbox menu i have:

Code:

[exec] (K3B) {sudo k3b}
Back to top
View user's profile Send private message
Paulten
Apprentice
Apprentice


Joined: 28 Mar 2003
Posts: 257
Location: Sykkylven, Norway

PostPosted: Wed Nov 17, 2004 12:03 pm    Post subject: Reply with quote

My way :

vi /etc/pam.d/su
add :
auth sufficient /lib/security/pam_wheel.so use_uid trust

Users in the group wheel does not need to type password when typing "su"
;)
_________________
Homepage : http://paul.kde.no Jabber ID : tenfjord@jabber.org
"Dei levde som dyr. Dei verken røykte eller drakk" -Ukjent
Back to top
View user's profile Send private message
outspoken
Guru
Guru


Joined: 14 Feb 2004
Posts: 464
Location: orlando, fl

PostPosted: Thu Nov 18, 2004 3:05 am    Post subject: Reply with quote

Paulten wrote:
My way :

vi /etc/pam.d/su
add :
auth sufficient /lib/security/pam_wheel.so use_uid trust

Users in the group wheel does not need to type password when typing "su"
;)


does anything need to be reset after adding this? it does not work for me. when i checked inside the /etc/pam.d/su file there was the line you mentioned commented out - so i just used that one instead.

im guessing i have to logout or possibly resource my enviornment, not sure?

ok, well i just did 'source /etc/profile' and now it works. cool stuff.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum