LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Login as root ? (https://www.linuxquestions.org/questions/mandriva-30/login-as-root-203817/)

jmr0311 07-11-2004 04:31 PM

Login as root ?
 
Hi everyone, When I turn on my computer at the point in the booting sequence where it shows you the login screen, the only thing it shows is the regular user account I create. When I want to login as root do I need a different login account or all I have to do is type my root password under the user login screen, cause if this is the case which I tried already, the login screen start shacking and it didn't like the password.
The other question I have is when you login as a regular user and then change to su #root in kconsole, are you getting the same permissions if you where login in as a root at the login screen when the machine is booting up. When you change to #root under kconsole can you use the GUI file manager and text editor to modify files , move files , etc.

Javi

Boby 07-11-2004 05:30 PM

Hi!

To login as root you have to type in the user box root and then password.

When you change to root from console with su you get all privileges. The default directory is the one of the user wich is logged in. To change to root and have the default directory of root use su -

To have root privileges in X, so you can copy, move, modify,..., files you have to use this:
xhost +localhost
su -
password:
echo $DISPLAY
export DISPLAY=:0
xhost -


I don't know if there's another way to do it, from icons or something like that 'cause I don't use root in X.

Good luck and I hope this helped!

Boby

XavierP 07-12-2004 03:10 AM

If you open (and I'm not at my box right now) the System-->Configuration-->Configure My Computer window, one of the icons is for user accounts. Find the Root account and uncheck the box which is set to hide the root account. You should then be able to log in as root from the graphical login.

But, before you do that, read on. The discussion about logging in as root is one which frequently comes up on LQ. We all, mostly, agree that it is a Bad Thing® - if you login as root commands will then affect the whole system. You may delete things, compromise things and a variety of other actions which will damage your system. Logging in as su is inherently safer, you get all the rights of root, with less of the dangers.

BIACS 07-12-2004 07:18 AM

Also, if you are only looking to be able to browse your system with Konqueror as root then you have two options while logged in with your profile.

1) Open terminal window, type su and enter your root password when prompted. Your session in the terminal window will show a # instead of $ to indicate you are running that session as root. You can then type konqueror which will launch the konqueror application (similar to windows explorer) with root permission. You can browse any folder then.

2) Open a terminal window and type kdesu konqueror and enter your root password when prompted. It will do the same thing. You could also create a link to application for running konqueror as root and add it to your menu.

jmr0311 07-12-2004 07:54 AM

Thank you guys for this advise that completely clarify a lot of questions about root permissions and kconsole sessions. Let me see if I really understand;

1) When you launch kconsole session and you are login as an user this is what you see [user@home-desktop user]$
2) when you decide to acquire root privileges, then you type "su" to switch user like this [user@home-desktop user]$su
3) After you press "enter" it ask you for password.
4) The directory should change to something like this [root@home-desktop user]#

Then and only then, if you launch(execute) any application within this command line you will gain the privilege's of a root user. The way you launch this applications is by just typing their names?, is this correct. So if I want to move files around or manipulate files all I have to do is open "konqueror" and then browse to the file, am I correct. Also if I want to edit the content on a file all I have to do is open a text editor like "kwrite", browse to the file and Beulah!!!!!. This has being a great piece of information because what I was doing was opening the root sessions but not launching the applications from the kconsole terminal, instead I was going to the applications icon in the menu in the desktop screen and open it up, browse the file, but I wasn't able to do anything to it because it keep telling me I don't have permissions.

Javi

XavierP 07-12-2004 08:10 AM

Yes to all of that :) When you use su in the console, any command you enter in that console will be issued as root, up until you type exit to leave it.

To move files graphically, yep, Konqueror is good for that. Most directories require root access, so you may want to track down the "File Manager (Super User)" icon in the menu bar. What will happen is that when you click it, you will be prompted for the root password and then Konqueror will run with root privilege until you close it.

Again graphically, I personally find kwrite to be adequate for editing most files, as you gain in knowledge and confidence, you may want to check out other options (vi, vim, emacs, nano, pico, etc etc).

jmr0311 07-12-2004 09:34 AM

Thank you XavierP. What do you mean with
Quote:

track down the "File Manager (Super User)" icon in the menu bar
. How can I do this to speed up this process.

Javi:)

XavierP 07-12-2004 10:00 AM

Open the menu with the "start button". have a look in either "More Applications" or "System".


All times are GMT -5. The time now is 08:46 AM.