View previous topic :: View next topic |
Author |
Message |
Chemtux n00b
Joined: 10 Apr 2002 Posts: 22 Location: The Netherlands
|
Posted: Wed May 29, 2002 8:19 am Post subject: su problem |
|
|
A couple of days back, I started having problems with 'su', I can still run the command, but after that I can't launch every program like ifconfig or give a init 0.
Does somebody have any ideas
Greetz _________________ Nope |
|
Back to top |
|
|
ElCondor Guru
Joined: 10 Apr 2002 Posts: 520 Location: Vienna, Austria, Europe
|
Posted: Wed May 29, 2002 8:48 am Post subject: |
|
|
you have to "su -"
an ordinary su gives you superuser privileges, but su - performs a (nearly) full login, including setting the paths for root.
"ifconfig" is in /sbin/ which is not in the $PATH for normal users
* ElCondor pasa * _________________ Here I am the victim of my own choices and I'm just starting! |
|
Back to top |
|
|
Chemtux n00b
Joined: 10 Apr 2002 Posts: 22 Location: The Netherlands
|
Posted: Wed May 29, 2002 5:45 pm Post subject: |
|
|
Thanks, but when did this change??? And do they mention this anywhere standard?? _________________ Nope |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Wed May 29, 2002 7:03 pm Post subject: |
|
|
Linux has always been that way, as far as I've used it (6 years). It's not just a gentoo thing. It applies to su to any user, not just the root login.
Perhaps before you had actually logged in as root. |
|
Back to top |
|
|
Chemtux n00b
Joined: 10 Apr 2002 Posts: 22 Location: The Netherlands
|
Posted: Wed May 29, 2002 7:30 pm Post subject: |
|
|
Hi,
I have also been using linux for at least six years, but after the installation of gentoo-1.0, is was possible to run ifconfig, when I used su from within the wheel group. And I know from other distro's like SuSE it is also possible with only the command 'su', to change the runlevel to zero and run ifconfig.
I think this was caused by a resent update I performed, I will try to find out which...............not so long ago I did a major update and changed the base-layout of the system.................. _________________ Nope |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Wed May 29, 2002 7:42 pm Post subject: |
|
|
meh. I just have the habit of always including the dash. Never run into problems then. |
|
Back to top |
|
|
radfaraf n00b
Joined: 25 May 2002 Posts: 55 Location: NJ
|
Posted: Wed May 29, 2002 8:30 pm Post subject: |
|
|
I noticed with su - I get my nice prompt instead of bash-2.05a$
where are the settings for this being loaded from. |
|
Back to top |
|
|
AutoBot l33t
Joined: 22 Apr 2002 Posts: 968 Location: Usually Out
|
Posted: Thu May 30, 2002 12:39 am Post subject: |
|
|
Same thing has happened to me and I haven't done any major updating, no big deal but it would be nice to know what happened.
I hate when something changes without me doing it
To radfaraf you can add the following to your ~/.bashrc and achieve the same effect if I understand what your saying.
Code: |
source /etc/profile
|
_________________ This message self destructed a long time ago. |
|
Back to top |
|
|
radfaraf n00b
Joined: 25 May 2002 Posts: 55 Location: NJ
|
Posted: Thu May 30, 2002 1:06 am Post subject: |
|
|
I see the code i wanted in there
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
|
|
Back to top |
|
|
TwoSlick Tux's lil' helper
Joined: 22 Apr 2002 Posts: 114 Location: Rolla, MO
|
Posted: Fri May 31, 2002 12:23 am Post subject: |
|
|
Strange thing. Same thing happened here, but I noticed something. When I do the plain su, I don't have the correct paths, but I CAN open X-windows programs finally.
When I tried su - , the paths are correct, but I'm back to not being able to open x-windows programs.
Now..... I tried Autobot's suggestion of adding source /etc/profile, and now I have the best of both worlds. With plain su, I have all of my correct settings, AND I can open X-win programs!!!
- Tim |
|
Back to top |
|
|
|