Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do I log in as root? I am using Suse 10.0 with KDE 3.5. I occasionally come up with this question and thought I would finally ask. I close my current session and get the root login screen, I type my password, and it opens up in YAST control centre. From here I can't seem to go anywhere. When I get the occasional message that I can't run a program or something because I am not root, I would like to be able to login as root and do what I would like.
I know how to become super user in Konsole, but that isn't quite the same as logging in as root.
Well, when you log into the computer, you should be able to log in as root like any other user. Just type 'root' as the username and your root password for the password. However, from what I remember of Suse, there should be some kind of "become administrator" button that lets you give the root password and be root temporarily and just for that program. And if that fails, you can just open a Konsole, su, and type the command 'yast2'. Both of those are better options. Root in a graphical environment is asking for trouble.
You can also use "kdesu" to start gui programs. For example, perhaps you prefer using kate over vim to edit conf files.
I think you can change whether root can login in YaST2 -> Users & Security. You can also log out of your session and choose the administration session. I prefer going directly to the YaST2 module I want; "kdesu yast2 sw_single" or "kdesu yast2 network" for example.
The safe way to run a particular GUI app as root is to go into a terminal and sudo to that application. In the GUI, you'll now be root for that app only.
The BEST way to run GUI apps as root is to not do it....It helps with the mental discipline if all admin task are run at the CLI.
(if you can not find Settings just open the konsole and type "kcontrol")
The next time you boot it will give you the selection of root or user.
To run the system under root is not a very good idea mainly if you are connected.
2. If you are as user and want to be root
Open konsole or alt-f2 and there type su or su -
You can read more about su (open konqueror and in the URL line type info:su or man:su)
For example you can use the su if you need to edit some file with restricted privilege like
$su -c kate
This last option is better than open the konsole became root and then open kate.
But follow pixellany advice when you can.
3. "su" behavior:
- tells su ("switch user") to load target user environment and
that includes its path setting. The username is optional,
if it doesn't exist, it assumes you mean root.
su - (no username, defaults to root, users roots environment)
su - someuser (username is someuser, uses 'someuser' environment)
su someuser (username is someuser but with no -, it inherits
environment of the caller)
4. Kmenu an su
If you need to run a program as a root and you want to have it or is in the kde menu
Open menu/Rmouse edit menu Then go to the application click on it and checked "Run as a different user" box and enter root.
The next time you selected the application in the menu before it opens will ask you for the root password.
Again read pixellany reply. Open konqueror and type man:sudo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.