LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-07-2004, 07:57 AM   #16
asktoby
Member
 
Registered: Jul 2003
Location: Cardiff, England ;)
Distribution: Mandrake 9.1
Posts: 94

Rep: Reputation: 15

"Use su - instead of su, to make the shell a login shell - that will give you root's paths and settings as well."

Can you elaborate please? I understand "Shell" as the command line, which in Mandrake is what you get when you open a terminal app.

I su to root by opening a terminal app and typing
su root
then typing my root password.
 
Old 01-07-2004, 08:36 AM   #17
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
Firstly, it is enough to issue su (or su -) to login as root. I mean, you don't have to specify "root".

Secondly, when you use a login shell (as opposed to just a shell), then your aliases and other settings you've configured in /etc/profile and such files, will be read. This also means that environment variables (like PATH and so on) will be set up correctly.
 
Old 01-07-2004, 09:01 AM   #18
asktoby
Member
 
Registered: Jul 2003
Location: Cardiff, England ;)
Distribution: Mandrake 9.1
Posts: 94

Rep: Reputation: 15
Is a "login shell" the blank prompt screen I get when I go alt-F1>F7?
 
Old 01-07-2004, 09:24 AM   #19
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
Hm, nooo... not strictly.... I think When you login on the console ((Ctrl+)Alt+F1->F6), you will login to a login shell. The shell in itself is "just" the command interpreter. Actually, when you use the command line, you're in an "interactive shell", even though we speak of just "shells".

The only difference between a (interactive) shell and a (interactive) login shell that I know of, is that the login shell will treat you as the user you logged in as (I mean with your aliases and environment set properly - as you yourself configured it), as opposed to when you're just logged into an "ordinary" shell; then you use the command interpreter which only regards you as the specific user when it comes to file/directory/execution permissions.

Well, anyway... Do I make any sense? Or am I completely wrong? Someone please help me out here
 
Old 01-07-2004, 09:27 AM   #20
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
BTW, try and see the differences yourself: use both su <user> and su - <user> and compare!

man bash and man tcsh might also give you some hints.
 
Old 01-07-2004, 12:14 PM   #21
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
Re: Re: Re: Login in from shell

Quote:
Originally posted by sheka&teka
First, thanks for replying.
Second, I know it's a bad habit and I do not usually do that. I only need to login as root when I want to reboot my computer.
Since I have high security setting, I can't boot from the graphic mode, so I close the graphic mode and shell to boot. In this case I know that I have to be root in order to issue the init command so I want to login as root instead of login as user and than su.
So my question is, do I have a bug here or should it be like that ? Is it ok that I can't login as root and have to login as user and use the su command?
I understand most of what you're saying, but don't understand why you 'want to login as root instead of login as user and then su.'

You have no bug. If this bothers you, lower the security level in Mandrake Control Center.

'I close the graphic mode and shell to boot.' This is unclear to me.

To reboot your computer, all you need to do is open a terminal window (Konsole, rxvt, xterm, whatever.) Then su -. Then shutdown -r now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
bind error on high ports "address already in use" DCalabrese Linux - Networking 2 05-25-2005 10:21 AM
Grip, if "Allow high bits in filenames" on then there is a problem with encoding. brynjarh Linux - Software 0 10-24-2004 12:44 PM
redhat-config-securitylevel constantly on "high"... tom_on_linux Linux - Networking 4 07-07-2004 09:09 AM
Mandrake 10: Issues with "higher" security setting and web server maverick106 Mandriva 6 04-26-2004 11:39 AM
does failed using urpmi messed up my "Install Software" / "mandrake update" ??? sirpelidor Mandriva 1 11-02-2003 10:00 PM

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

All times are GMT -5. The time now is 05:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration