LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-21-2004, 01:14 PM   #1
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Rep: Reputation: 30
Sudo User Error !


I am using RH 8.0 and trying to configure sudo users,

---------------------------------------------
/etc/sudoers file
---------------------------------------------
# User alias specification
User_Alias PWADMIN=sudotest

# Cmnd alias specification
Cmnd_Alias PW=/usr/bin/passwd [A-z]*, !/usr/bin/passwd root
Cmnd_Alias AU=/usr/sbin/useradd [A-z]*
Cmnd_Alias IC =/sbin/ifconfig

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL
PWADMIN ALL=PW,AU,IC
#PWADMIN ALL=AU
----------------------------------------------------------------


for passwd command sudo user is working fine
but,

[sudotest@akshar sudotest]$ sudo useradd ttxx
Password:
sudo: useradd: command not found

[sudotest@akshar sudotest]$ sudo ifconfig
sudo: ifconfig: command not found

 
Old 08-22-2004, 10:08 PM   #2
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
try with "sudo /usr/sbin/useradd ttxx" ...
full path to program you need to call
 
Old 08-24-2004, 01:01 PM   #3
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
thanks

thanks

Dear AltF4 it works,

but when passwd command is running without full path then useradd should also run.

Any idea, tell me??
 
Old 08-25-2004, 10:58 AM   #4
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
sudo starts your command in a new "subshell"
this subshell might have different $PATH settings
so you better give absolute path names.
 
Old 08-25-2004, 08:26 PM   #5
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
then why "passwd" command is working without giving full path name.
 
Old 08-26-2004, 06:56 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,443

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
passwd is normally available to all users. useradd & ifconfig are normally only available to root. sudo gives you the ability to run root cmds, but you need to know what they are.
 
Old 08-28-2004, 10:03 PM   #7
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
thanks chrism01
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 wont allow user sh4d0w13 Linux - Newbie 2 08-17-2005 06:39 PM
SUDO - allow user joe to SU to usera sajjad02 Linux - Newbie 1 03-10-2005 01:25 PM
change to unprivileged user without sudo? german Linux - Security 2 01-28-2005 01:32 PM
SUDO as *non-root* user spratty Linux - Newbie 3 05-19-2004 03:35 AM
track sudo user mikeshn Linux - General 2 10-28-2003 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:04 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