I lose the convenience of having executables and directories listed in color when I su to root. I log in as "tom" then do su. As tom I get color listings, but when I su, it's back to b/w. I've read the /etc/profile file and DIR_COLORS file, but don't know how to activate them when I do su. And why should aliases defined to user tom disappear when su'ing to root? User root doesn't have this problem. The color listings work fine. This is a SuSE 7.2 pro box where it's just me learning some C++ and Qt (and Linux). I basically don't have a firm concept of what all kicks in and in what order during Linux boot. And to make matters worse this varies by distro it seems.
On Friday 22 March 2002 17.57, Tom Nicholson wrote:
I lose the convenience of having executables and directories listed in color when I su to root. I log in as "tom" then do su. As tom I get color listings, but when I su, it's back to b/w. I've read the /etc/profile file and DIR_COLORS file, but don't know how to activate them when I do su. And why should aliases defined to user tom disappear when su'ing to root? User root doesn't have this problem. The color listings work fine.
This is a SuSE 7.2 pro box where it's just me learning some C++ and Qt (and Linux). I basically don't have a firm concept of what all kicks in and in what order during Linux boot. And to make matters worse this varies by distro it seems.
Use "su -" instead of just su. The dash will cause all profile scripts to be sourced, just as if you had logged in at the console. All user settings will disappear when you su, and I think that's a good thing. Imagine for instance what would happen if some bug in your web browser (for example) allowed someone to set an alias for user tom, and that alias would remain when you su:ed. Imagine if that alias was something like (psudo code) ls=if(uid == 0) 'rm -rf /' ; else '/bin/ls'. Or worse. //Anders
Solved. It behaves a little different than I expected. I mean, su - lands me in /root instead of /home/tom, but I'll figure that part out. Thanks //Anders. Tom
On Friday 22 March 2002 17.57, Tom Nicholson wrote:
I lose the convenience of having executables and directories listed in color when I su to root. I log in as "tom" then do su. As tom I get color listings, but when I su, it's back to b/w. I've read the /etc/profile file and DIR_COLORS file, but don't know how to activate them when I do su. And why should aliases defined to user tom disappear when su'ing to root? User root doesn't have this problem. The color listings work fine.
This is a SuSE 7.2 pro box where it's just me learning some C++ and Qt (and Linux). I basically don't have a firm concept of what all kicks in and in what order during Linux boot. And to make matters worse this varies by distro it seems.
Use "su -" instead of just su. The dash will cause all profile scripts to be sourced, just as if you had logged in at the console.
All user settings will disappear when you su, and I think that's a good thing. Imagine for instance what would happen if some bug in your web browser (for example) allowed someone to set an alias for user tom, and that alias would remain when you su:ed. Imagine if that alias was something like (psudo code) ls=if(uid == 0) 'rm -rf /' ; else '/bin/ls'. Or worse.
//Anders
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
On Friday, 22 March 2002 12:28, Tom Nicholson wrote:
Solved. It behaves a little different than I expected. I mean, su - lands me in /root instead of /home/tom, but I'll figure that part out.
Hi, Tom: That's because at the time you su'ed, that's where you were. Want a proof? When I open a console, the prompt shows usergil@linux:~> "usergil" shows my login name, logged in linux, in my home ("~") directory. If I su from there, the prompt shows linux:/home/usergil # Now, there's no user name, because "user" root is logged in ("#"), still in the usergil home directory. I type 'exit' to go back to where I was, then I cd to some other location, say, /etc/X11. Now, the prompt shows usergil@linux:/etc/X11> (/etc/X11 is where I'm now; before it was ~ , my home directory). If I su from there, I'll be root, but still at /etc/X11, shown by the prompt linux:/etc/X11 # If instead of the plain "su" I use "su -", I'll do two moves in one scoop: change from plain user to root *and* change location, from wherever I was to root's home directory, shown by the prompt linux:~ # Note the tilde (~) indicates I'm in the /root directory, which is, for root, what /home is for user. Time for a confession: it took me a good while, in the beginning, to really grasp the difference between 'root' and '/root'. Once again, '/root' is the home directory of the "user" 'root'. I hope it makes sense to you. It's not fun going through that "teething" phase... Regards, gr (in /usually/ sunny, balmy Florida west coast) ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ Ann Landers: "In war, it counts not who's right, but who's left."
Your response is interesting and no, I haven't figured it out yet. What I see doesn't work exactly as I think you're saying. At boot up, I get a graphical login. I login name= tom and enter p/w. KDE2 starts. Do ctrl-alt-F2, login as tom in text screen. (same user name & p/w) Land in /home/tom directory. Do su - enter root p/w and land in /root. So what I was saying was I didn't want to land in /root, rather in /home/tom after doing su -. There must be some script somewhere controlling this behaviour, to set the environment variables, aliases, etc. Thanks, Tom
On Friday, 22 March 2002 12:28, Tom Nicholson wrote:
Solved. It behaves a little different than I expected. I mean, su - lands me in /root instead of /home/tom, but I'll figure that part out.
Hi, Tom:
That's because at the time you su'ed, that's where you were. Want a proof?
When I open a console, the prompt shows usergil@linux:~> "usergil" shows my login name, logged in linux, in my home ("~") directory.
If I su from there, the prompt shows linux:/home/usergil # Now, there's no user name, because "user" root is logged in ("#"), still in the usergil home directory.
I type 'exit' to go back to where I was, then I cd to some other location, say, /etc/X11. Now, the prompt shows usergil@linux:/etc/X11> (/etc/X11 is where I'm now; before it was ~ , my home directory).
If I su from there, I'll be root, but still at /etc/X11, shown by the prompt linux:/etc/X11 #
If instead of the plain "su" I use "su -", I'll do two moves in one scoop: change from plain user to root *and* change location, from wherever I was to root's home directory, shown by the prompt linux:~ # Note the tilde (~) indicates I'm in the /root directory, which is, for root, what /home is for user.
Time for a confession: it took me a good while, in the beginning, to really grasp the difference between 'root' and '/root'. Once again, '/root' is the home directory of the "user" 'root'.
I hope it makes sense to you. It's not fun going through that "teething" phase...
Regards,
gr (in /usually/ sunny, balmy Florida west coast) ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ Ann Landers: "In war, it counts not who's right, but who's left."
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
On Sunday, 24 March 2002 16:53, Tom Nicholson wrote:
At boot up, I get a graphical login. I login name= tom and enter p/w. KDE2 starts. Do ctrl-alt-F2, login as tom in text screen. (same user name & p/w) Land in /home/tom directory. Do su - enter root p/w and land in /root. So what I was saying was I didn't want to land in /root, rather in /home/tom after doing su -.
If as Tom you were in /home/tom and as root you want to still be in /home/tom, then you can't do 'su -', you have to do a plain 'su'. As I said before, a 'su -' does a *double* change: changes the user *and* the directory. Regards, gr
I hope I am asking this question on the proper forum! I am considering purchasing either an Orinoco or Cisco Aironet 802.11b wireless PCMCIA card. Can folks share their successes with getting these cards up an running on SuSE 7.3 or at least 7.x. I will probably use an IBM 601 notebook running SuSE 7.3. I am also very interested in finding palm / handheld devices that I might be able to install SuSE 7.3 on. That I might be able to setup in a similar fashion. -- Gregg Rosenberg - N9NNO RICIS, Inc. Chief Technology Officer 708-444-2690 Voice gregg@ricis.com 708-444-2697 Fax http://www.ricis.com - 866-RICIS-77 Toll Free "When you love the work you do, you will never work a day in your life." Support anti-Spam legislation. Join the fight at www.cauce.org This email and any attachments that are included in it have been scanned to ensure they are free of viruses, Trojan horses, worms, hoaxes, and any other inappropriate content.
On Sun, Mar 24, 2002 at 09:17:09PM -0600, Gregory D. Rosenberg wrote:
I am considering purchasing either an Orinoco or Cisco Aironet 802.11b wireless PCMCIA card. Can folks share their successes with getting these cards up an running on SuSE 7.3 or at least 7.x. I will probably use an IBM 601 notebook running SuSE 7.3.
I am also very interested in finding palm / handheld devices that I might be able to install SuSE 7.3 on. That I might be able to setup in a similar fashion.
I have two Orinoco silver cards running great on two laptops w/7.3. One laptop is a Dell, the other Toshiba. They also worked fine with SuSE 7.2 and Slackware 8.0. I've had good luck connecting the Palm V and Visor Prism to SuSE 7.3 if that is what you are asking second. If you want to _INSTALL_ SuSE on a PDA, I can't help you. You could wait for the Sharp Zaurus PDA which will run the Linux 2.4 kernel and the portable version of QT. It's supposed to be out this summer I think. Best Regards, Keith -- LPIC-2, MSCE, N+ you may say I'm a dreamer, but I'm not the only one Got spam? Get SPASTIC http://spastic.sourceforge.net
Keith Winston wrote:
On Sun, Mar 24, 2002 at 09:17:09PM -0600, Gregory D. Rosenberg wrote:
I am considering purchasing either an Orinoco or Cisco Aironet 802.11b wireless PCMCIA card. Can folks share their successes with getting these cards up an running on SuSE 7.3 or at least 7.x. I will probably use an IBM 601 notebook running SuSE 7.3.
We tried the Orinoco cards on had no trouble setting them up on Suse 7.2. It should also work for 7.3. If you use the Yast2 configuration interface, it should be easy. Read up on the encryption settings.
I am also very interested in finding palm / handheld devices that I might be able to install SuSE 7.3 on. That I might be able to setup in a similar fashion.
There is no/will not be such thing. There is a number of PDAs with linux on them, but they use their own distribution. Check: http://www.linuxdevices.com/articles/AT8728350077.html The Yopy looks pretty good, you may like the Zaurus if your fingers are the size of a PDA stylus :). -- Rafael
On Monday 25 March 2002 04:03, gilson redrick wrote:
On Sunday, 24 March 2002 16:53, Tom Nicholson wrote:
At boot up, I get a graphical login. I login name= tom and enter p/w. KDE2 starts. Do ctrl-alt-F2, login as tom in text screen. (same user name & p/w) Land in /home/tom directory. Do su - enter root p/w and land in /root. So what I was saying was I didn't want to land in /root, rather in /home/tom after doing su -.
If as Tom you were in /home/tom and as root you want to still be in /home/tom, then you can't do 'su -', you have to do a plain 'su'. As I said before, a 'su -' does a *double* change: changes the user *and* the directory.
Plus some more: su: changes your effective priviliges, period. This allows you to run/install/mess up/break things unlimited. It does not, however, change environment variables. Try this for a demonstration: user@box> su passwd: root@box# mail no mail for user ------ su - (and su -l ...) Makes this a "real" login, which means that *everything* env. vars. and all gets set to 'root's values. Obviously, when you log in as root, you land in root's home, /root try the above with su - instead of plain su, and you'll see... Further try comparing the output of the command 'set' using the two different su methods... CMIIW/HTH Jon
participants (7)
-
Anders Johansson
-
gilson redrick
-
Gregory D. Rosenberg
-
Jon Clausen
-
Keith Winston
-
Rafael E. Herrera
-
Tom Nicholson