Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-21-2004, 01:14 PM
|
#1
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Rep:
|
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
|
|
|
08-22-2004, 10:08 PM
|
#2
|
Member
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532
Rep:
|
try with "sudo /usr/sbin/useradd ttxx" ...
full path to program you need to call
|
|
|
08-24-2004, 01:01 PM
|
#3
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
thanks
thanks
Dear AltF4 it works,
but when passwd command is running without full path then useradd should also run.
Any idea, tell me??
|
|
|
08-25-2004, 10:58 AM
|
#4
|
Member
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532
Rep:
|
sudo starts your command in a new "subshell"
this subshell might have different $PATH settings
so you better give absolute path names.
|
|
|
08-25-2004, 08:26 PM
|
#5
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
then why "passwd" command is working without giving full path name.
|
|
|
08-26-2004, 06:56 AM
|
#6
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,443
|
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.
|
|
|
08-28-2004, 10:03 PM
|
#7
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
thanks chrism01
|
|
|
All times are GMT -5. The time now is 06:04 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|