Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
su problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Chemtux
n00b
n00b


Joined: 10 Apr 2002
Posts: 22
Location: The Netherlands

PostPosted: Wed May 29, 2002 8:19 am    Post subject: su problem Reply with quote

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
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Wed May 29, 2002 8:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Chemtux
n00b
n00b


Joined: 10 Apr 2002
Posts: 22
Location: The Netherlands

PostPosted: Wed May 29, 2002 5:45 pm    Post subject: Reply with quote

Thanks, but when did this change??? And do they mention this anywhere standard??
_________________
Nope
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed May 29, 2002 7:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
Chemtux
n00b
n00b


Joined: 10 Apr 2002
Posts: 22
Location: The Netherlands

PostPosted: Wed May 29, 2002 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed May 29, 2002 7:42 pm    Post subject: Reply with quote

meh. I just have the habit of always including the dash. Never run into problems then.
Back to top
View user's profile Send private message
radfaraf
n00b
n00b


Joined: 25 May 2002
Posts: 55
Location: NJ

PostPosted: Wed May 29, 2002 8:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
AutoBot
l33t
l33t


Joined: 22 Apr 2002
Posts: 968
Location: Usually Out

PostPosted: Thu May 30, 2002 12:39 am    Post subject: Reply with quote

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 :D

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
View user's profile Send private message
radfaraf
n00b
n00b


Joined: 25 May 2002
Posts: 55
Location: NJ

PostPosted: Thu May 30, 2002 1:06 am    Post subject: Reply with quote

I see the code i wanted in there
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
:D
Back to top
View user's profile Send private message
TwoSlick
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2002
Posts: 114
Location: Rolla, MO

PostPosted: Fri May 31, 2002 12:23 am    Post subject: Reply with quote

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!!! :D

- Tim
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum