FedoraThis forum is for the discussion of the Fedora Project.
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.
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.
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]#
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.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.