Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 09-23-2006, 03:17 PM   #1
Registered: Oct 2003
Posts: 280

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

[fred@localhost ~]$ su
[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
Registered: Sep 2006
Posts: 102

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
LQ Guru
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
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.


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


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
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 > Forums > Linux Forums > Linux - Distributions > Fedora

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration