LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-21-2006, 04:49 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
About sudo


Hi folks,

FC5_64
======

I read

man sudo
and following links
http://www.linuxhelp.net/guides/sudo/
http://www.cs.wcupa.edu/~rkline/Linu...ment-sudo.html

but can't resolve how to allow an user, say ABC;

1)
to use all root's applications without providing him/her the root password


2)
to use only the selected root's applications such, package1, package2, etc.

Please shed me some light. TIA


B.R.
satimis
 
Old 05-21-2006, 05:26 AM   #2
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
I don't know the default in Fedora, but you should make sure that /etc/sudoers does not contain a line like this:
Code:
Defaults targetpw
Then sudo will ask for the invoking user's password instead of the root password. Then
Code:
ABC ALL=(ALL) ALL
should solve 1).
You can also tell sudo not to ask for a password at all:
Code:
ABC ALL=(ALL) NOPASSWD: ALL
And if you want to restrict this capability to certain commands, replace the last "ALL" with a comma separated list:
Code:
ABC ALL=(ALL) NOPASSWD: /sbin/halt, /sbin/reboot
 
Old 05-21-2006, 05:49 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi spirit receiver,

Tks for your advice.

Quote:
you should make sure that /etc/sudoers does not contain a line like this:
Code:
Defaults targetpw
# cat /etc/sudoers
Code:
.....

Defaults    env_reset
Defaults    env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
                        LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
                        LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
                        LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
                        LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
                        _XKB_CHARSET"

root    ALL=(ALL) ALL
....
Whether adding following line on the file;

Code:
ABC  ALL=(ALL) ALL
to solve 1) asking for ABC's login password

OR

Code:
ABC  ALL=(ALL) /sbin/halt, /sbin/reboot
to solve 2) above asking for ABC's login password

TIA


B.R.
satimis
 
Old 05-21-2006, 07:08 PM   #4
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
Er, what's your question? In both cases, ABC's password will be required. In the first example, ABC may invoke any command as root, whereas only the specified commands will be available in the second.
 
Old 05-22-2006, 03:15 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi spirit,

Your further advice noted with tks.

satimis
 
  


Reply



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
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
/etc/sudo darkleaf Linux - Software 2 05-14-2005 03:08 PM
sudo pk21 Linux - Newbie 7 10-07-2003 07:53 AM
need help with sudo mla Linux - Software 4 10-02-2003 11:05 AM
sudo? nabil Linux - Security 1 02-12-2001 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 04:05 AM.

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