LinuxQuestions.org
Visit Jeremy's Blog.
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 06-07-2006, 05:47 AM   #1
Duster
Member
 
Registered: Jul 2005
Distribution: openSuSE 10.2; PCLinuxOS 0.93a
Posts: 59

Rep: Reputation: 15
FC5 su comand misbehaving


Coming over from SuSE 10.0 (still on my desktop) to fc5 on this laptop I have discoved (to myself) odd terminal behavior under fc5 (2.6.16-1.2122_FC5 kernel).

I was setting up by wireless card [in fc5] and noticed that when I "su" into root the OS tells me it can not find "lspci", "ifconfig", or "iwconfig". I presume there are other command as well, just have not tried them with this install yet.

Just to pinch myself, I did use "whoami" to ensure I was root. Confirmed - yes I was root.

Anyway when I log out of my User login and re-log in as root, all of the above command work perfectly.

I know in SuSE 10.0 you ARE root when you "su". So this strikes me as very strange.

Is this a default fc5 setting, or is a link screwey on this install? If it is how to I fix this little annoying issue. At least it is not a major problem. Again this works as it should when I log in as root and not "su" to root.

Thanx

[me@localhost ~]$ su
Password:
[root@localhost me]# whoami
root
[root@localhost me]# lspci
bash: lspci: command not found
[root@localhost me]# iwconfig
bash: iwconfig: command not found
[root@localhost me]# ifconfig
bash: ifconfig: command not found
[root@localhost me]#

????? just leaves me wondering
 
Old 06-07-2006, 05:57 AM   #2
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
either "su -" or edit your .bash_profile (a hidden file in home dir)

By default SuSE includes /sbin in PATH for users and by default Fedora doesn't (as a vidiot-proofing precaution). That's really the only difference. Nothing is broken.

Here's my .bash_profile

[climber@localhost ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/sbin:/usr/sbin

export PATH
unset USERNAME
 
Old 06-07-2006, 06:05 AM   #3
worzel68
Member
 
Registered: May 2006
Location: Sydney
Distribution: FC5, FC3, AIX, System V,
Posts: 50

Rep: Reputation: 15
su command

Hi Duster

I think you need to use su - (su with hyphen), what this does is make the shell a login shell and so it sets all the environment variables associated with the new user, so that you truly become that user, whereas with su on its own does not set the environment variables.

One of effects this has is setting path environment variable, allowing you to (for example) execute stuff that is in /etc/sbin without specifying the directory explicitly.

Another thing for your info - su is an abbreviation for substitute user (not super user), so you can use to substitute to any user like this:

su - username

also check out man su and info su

Hope this helps you out

David Saunders
 
Old 06-07-2006, 06:06 AM   #4
Duster
Member
 
Registered: Jul 2005
Distribution: openSuSE 10.2; PCLinuxOS 0.93a
Posts: 59

Original Poster
Rep: Reputation: 15
Wow I just posted this. Thank you for the quick response. "su-" works. Will look into editing.

I could not have asked for a better response. Was wondering about this - in case with all the updates a little thing went wrong.

thank you again.
 
  


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
sed misbehaving? linmix Programming 9 12-04-2005 10:43 AM
A misbehaving ad - Firefox 1.0.7 Orkie LQ Suggestions & Feedback 3 10-27-2005 04:10 PM
Cups misbehaving mjrich Debian 2 02-22-2005 04:11 PM
flashdrive misbehaving linmix Linux - Hardware 9 02-06-2005 04:32 AM
Why is my samba misbehaving? sapphos Linux - Networking 4 10-11-2003 02:27 PM

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

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