LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 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: 105

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
LQ 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,700

Rep: Reputation: 65
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



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

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

All times are GMT -5. The time now is 06:02 PM.

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