LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 09-23-2006, 03:17 PM   #1
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Rep: Reputation: 30
su is not su(ing)


[fred@localhost ~]$ su
Password:
[root@localhost ~]# iptables -L
bash: iptables: command not found

but if I exit and relog in as root it works.
 
Old 09-23-2006, 03:42 PM   #2
adam999
Member
 
Registered: Sep 2006
Posts: 95

Rep: Reputation: 18
use su -

this will use root's PATH

you can also use su - to log in as other users

eg. su - adam (then suppy root password if not logged in as root)
 
Old 09-23-2006, 03:42 PM   #3
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
You need to use ' su - '. Reason su is switches to root but still using the users enviroment variables. Since /sbin is not part of a users path the command you type is not found. If you type ' /sbin/iptables -L ' as su then it would work. So going ' su - ' it will be root with root's enviroment variables and then you can use the command without /sbin since /sbin is part of roots path.

Brian1

Last edited by Brian1; 09-23-2006 at 03:43 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
no ****ing way! this is too much, i am really annoyed now jimjamjahaa Arch 6 03-14-2006 04:33 PM
problems with mount -ing egypt Linux - Newbie 3 10-11-2004 12:47 PM
cd,ing to directory texasjailer Linux - Newbie 1 06-17-2004 12:45 PM
S*[t-r]+[ing]?g gr33ndata Programming 10 03-13-2004 05:15 AM
just a quicky...(su-ing) salparadise Linux - Newbie 2 01-24-2003 04:40 PM


All times are GMT -5. The time now is 12:42 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration