Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Can't login as root on gnome

Linux Kernel, Network, and Services configuration.
Message
Author
MarcusW
Posts: 183
Joined: 2009-12-04 14:52
Location: Sweden

Re: Can't login as root on gnome

#16 Post by MarcusW »

inky wrote:Doesn't work. My synaptic doesn't have that dialog anywhere. I know what you are referring to because an older version had it, but this one does not that I can find. That's why I need to edit the file itself (I found it) but have to be logged as root to do it.
Thanks
Inky
Open terminal, type:

Code: Select all

sudo gedit filename
Or if you only have su, no sudo:

Code: Select all

su
gedit filename
Remember to include the whole path to the file.

inky
Posts: 21
Joined: 2010-11-03 17:29

Re: Can't login as root on gnome

#17 Post by inky »

I have version .70-pre1. Not sure why they would have dropped that feature. I hadn't actually used it before but from researching debian versions it is clear there is a lot of repositories out there. Many are specialized and would be very useful for some people. Although most people that advanced are using the terminal anyway.
Thanks
Inky

User avatar
aicardi
Posts: 388
Joined: 2009-11-18 01:30
Location: Chicago

Re: Can't login as root on gnome

#18 Post by aicardi »

I think the command in the terminal would be

Code: Select all

gksu gedit /path/to/file
or with sudo

Code: Select all

gksudo gedit /path/to/file
Edited for clarification.
Jessie/Xfce

inky
Posts: 21
Joined: 2010-11-03 17:29

Re: Can't login as root on gnome

#19 Post by inky »

Thanks. That lets me fix this problem but still doesn't solve my original issue of being able to log in as root.
Thanks
inky

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Can't login as root on gnome

#20 Post by kedaha »

The command gksudo in the root terminal will cause a little box to appear allowing you to run programs as root or select from a list of users.
To access all your files as root via the graphical user interface:

Code: Select all

aptitude install nautilus-gksu
[Edited to correct package name]
To copy, delete and move files around etc using your mouse use the command:

Code: Select all

gksudo nautilus
Regarding the use of sudo, the Debian System Administration Guide, (available in the repos as debian-reference-en) states:
For the typical single user workstation such as the desktop Debian system on the laptop PC, it is common to deploy simple configuration of sudo(8) as follows to let the non-privileged user, e.g. penguin, to gain administrative privilege just with his user password but without the root password.

Code: Select all

# echo "penguin  ALL=(ALL) ALL" >> /etc/sudoers
Alternatively, it is also common to do as follows to let the non-privileged user, e.g. penguin, to gain administrative privilege without any password.

Code: Select all

# echo "penguin  ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
This trick should only be used for the single user workstation which you administer and where you are the only user.
Of course, "penguin" must be replaced with your user name.
Last edited by kedaha on 2011-03-11 07:09, edited 1 time in total.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

inky
Posts: 21
Joined: 2010-11-03 17:29

Re: Can't login as root on gnome

#21 Post by inky »

This will work for some uses but I just want to be able to log on as root. I am not sure why that is so difficult. I was able to do so in the past w/debian and with suse. The problem with using the su or sudo in the terminal is that when I install something like sql-ledger I have to follow the instructions exactly or I get fouled up. I do this by cutting and pasting and if I am not in plain root I invariably get in trouble. I haven't yet tried all of the above suggestions but have messed up enough to know to limit my opportunities to do so.
Thanks
Inky

User avatar
Bro.Tiag
Posts: 1924
Joined: 2007-06-02 19:14

Re: Can't login as root on gnome

#22 Post by Bro.Tiag »

inky wrote:This will work for some uses but I just want to be able to log on as root. I am not sure why that is so difficult. I was able to do so in the past w/debian and with suse. The problem with using the su or sudo in the terminal is that when I install something like sql-ledger I have to follow the instructions exactly or I get fouled up. I do this by cutting and pasting and if I am not in plain root I invariably get in trouble. I haven't yet tried all of the above suggestions but have messed up enough to know to limit my opportunities to do so.
Thanks
Inky
I've not followed very closely to know if gdm is able to be configured to allow root login (nor do I care), but you could always switch tty's, login as root, kill gdm and start X from the command line. Do what it is that you have to do, close gnome, restart gdm & then login as your user.

Cheers

inky
Posts: 21
Joined: 2010-11-03 17:29

Re: Can't login as root on gnome

#23 Post by inky »

MarcusW wrote:I think it's by design, but it's easy to change. ("logging in as root" at the installation means the root account is enabled, gdm will still reject it) Open the gdm settings -> Security -> Allow root/admin to log in.
This looks like it will work but where are gdm settings. I assume gdm is gnome.
Thanks
Inky

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Can't login as root on gnome

#24 Post by kedaha »

inky wrote:This will work for some uses but I just want to be able to log on as root. I am not sure why that is so difficult. I was able to do so in the past w/debian and with suse. The problem with using the su or sudo in the terminal is that when I install something like sql-ledger I have to follow the instructions exactly or I get fouled up. I do this by cutting and pasting and if I am not in plain root I invariably get in trouble. I haven't yet tried all of the above suggestions but have messed up enough to know to limit my opportunities to do so.
Thanks
Inky
To quote from The Debian System Administration Guide
Warning
Never start the X display/session manager under the root account by typing in root to the prompt of the display manager such as gdm(1).
You can do cutting and pasting as root in the desktop environment as detailed in my previous post.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: Can't login as root on gnome

#25 Post by bugsbunny »

The package mentioned above is actually nautilus-gksu (not nautilus-gksudo)

That will enable you to use right click to edit files as root, or open directories as root and should give you everything you need. If you really absolutely want to login as root, well it's your box and if you break it you get to keep all the pieces. Do you have gdm or gdm3 installed? In gdm3 there's no gui way to do this that I know of, but I think there's a manual way (I can get root to show up as a valid user to login as, but I haven't tried actually logging in as root - don't want to, have never needed to, never would need to).

I very strongly urge you NOT to actually login as root, in that direction lies trouble. It's just too tempting to start doing everything as root, and that's how you get yourself in trouble. However, if you insist:

This is for gdm3 only:
Modify /etc/gdm3/daemon.conf and add the following 2 lines to the [greeter] section.

Code: Select all

Include=root
Exclude=bin,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp,operator,nobody,nobody4,noaccess,postgres,pvm,rpm,nfsnobody,pcap
You need the entire exclude line in order to override the default one (which is the same, except that it also includes root). Again I strongly urge you not to do this. It's very, very, VERY bad practice.

BowCatShot
Posts: 959
Joined: 2006-07-15 12:08

Re: Can't login as root on gnome

#26 Post by BowCatShot »

"It is by design. You are not allowed to login as root in a GUI. That is not a bug.
Why would anyone login as root in a GUI? This is a real security risk."

I'll decide that.

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Can't login as root on gnome

#27 Post by kedaha »

bugsbunny wrote:The package mentioned above is actually nautilus-gksu (not nautilus-gksudo)
Thanks; I've edited the post to correct the erratum.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

MarcusW
Posts: 183
Joined: 2009-12-04 14:52
Location: Sweden

Re: Can't login as root on gnome

#28 Post by MarcusW »

inky wrote:
MarcusW wrote:I think it's by design, but it's easy to change. ("logging in as root" at the installation means the root account is enabled, gdm will still reject it) Open the gdm settings -> Security -> Allow root/admin to log in.
This looks like it will work but where are gdm settings. I assume gdm is gnome.
Thanks
Inky
It's somewhere in the "settings" or "administration". I currently don't have a menu on my panel, and my system language is swedish so not sure I can help you navigate there. It's something like "log in window". It's really not hard to find anyways. And I do recommend you don't allow root login, sudo/su is easy to use.

User avatar
TobiSGD
Posts: 859
Joined: 2010-05-08 22:27
Location: Hannover, Germany

Re: Can't login as root on gnome

#29 Post by TobiSGD »

BowCatShot wrote:"It is by design. You are not allowed to login as root in a GUI. That is not a bug.
Why would anyone login as root in a GUI? This is a real security risk."

I'll decide that.
You can decide to login as root, it is your machine. But you can not decide if it is a security risk, one can't decide about facts.

BowCatShot
Posts: 959
Joined: 2006-07-15 12:08

Re: Can't login as root on gnome

#30 Post by BowCatShot »

What's a security risk for you isn't a security risk for me. Just like walking down some streets for some people, unike myself, who cannot defend themselves is a security risk.

MarcusW
Posts: 183
Joined: 2009-12-04 14:52
Location: Sweden

Re: Can't login as root on gnome

#31 Post by MarcusW »

BowCatShot wrote:What's a security risk for you isn't a security risk for me. Just like walking down some streets for some people, unike myself, who cannot defend themselves is a security risk.
There are many programs that simply aren't designed to run as root (I think many of them will actually refuse to start, for example VLC) and may mess things up. Because everything runs as root, there really isn't anything stopping you or the programs you run to mess things up. If you tell the system to overwrite your entire harddrive, it will. If you ask it to erase all your system files, it will. If you're new at Debian/Linux, I really recommend you get used to using su/sudo before trying to log in as root in gdm.

inky
Posts: 21
Joined: 2010-11-03 17:29

Re: Can't login as root on gnome

#32 Post by inky »

MarcusW wrote:
inky wrote:
MarcusW wrote:I think it's by design, but it's easy to change. ("logging in as root" at the installation means the root account is enabled, gdm will still reject it) Open the gdm settings -> Security -> Allow root/admin to log in.
This looks like it will work but where are gdm settings. I assume gdm is gnome.
Thanks
Inky
It's somewhere in the "settings" or "administration". I currently don't have a menu on my panel, and my system language is swedish so not sure I can help you navigate there. It's something like "log in window". It's really not hard to find anyways. And I do recommend you don't allow root login, sudo/su is easy to use.
I don't think it is allowed anymore. I did have that on an older setup and changed it but can't find it anywhere on this one. I understand what everyone is saying about screwing up your system but I used Windows 95 and it taught me the value of backing up so screwing up doesn't scare me as much as maybe it should. I am also doing this on a computer that is and I assume it's going to get messed up and expect to reinstall periodically. Linux is much less likely to get mangled but still seems to accumulate stuff that slows it down.
Thank
Inky

inky
Posts: 21
Joined: 2010-11-03 17:29

Re: Can't login as root on gnome

#33 Post by inky »

MarcusW wrote:
BowCatShot wrote:What's a security risk for you isn't a security risk for me. Just like walking down some streets for some people, unike myself, who cannot defend themselves is a security risk.
There are many programs that simply aren't designed to run as root (I think many of them will actually refuse to start, for example VLC) and may mess things up. Because everything runs as root, there really isn't anything stopping you or the programs you run to mess things up. If you tell the system to overwrite your entire harddrive, it will. If you ask it to erase all your system files, it will. If you're new at Debian/Linux, I really recommend you get used to using su/sudo before trying to log in as root in gdm.
I understand what your saying but I have a couple of things that I want to install (an HP program for printers and an accounting program) that have instructions to work from the root login so I would have to adjust those for su, and I am not good at that.
Thanks
Inky

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: Can't login as root on gnome

#34 Post by bugsbunny »

There's always "Accessories|Root Terminal". And there's no real "adjustment" to working as root from su. Open a terminal, issue an su command, enter the password, and you're root. Follow instructions from that point. It's more complicated to adjust instructions that use sudo this and sudo that :) (Just work as root and drop the sudo)

As far as the HP program for printers I suspect you'll find it in the repositories (hplip by any chance?)

What accounting program?

you'd be better off asking for specific help on how to go about doing a task rather than taking the "login as root" approach (which is a windows mentality at work. And when i'm working in Windows yes, I work as admin)

MarcusW
Posts: 183
Joined: 2009-12-04 14:52
Location: Sweden

Re: Can't login as root on gnome

#35 Post by MarcusW »

inky wrote:
MarcusW wrote:
BowCatShot wrote:What's a security risk for you isn't a security risk for me. Just like walking down some streets for some people, unike myself, who cannot defend themselves is a security risk.
There are many programs that simply aren't designed to run as root (I think many of them will actually refuse to start, for example VLC) and may mess things up. Because everything runs as root, there really isn't anything stopping you or the programs you run to mess things up. If you tell the system to overwrite your entire harddrive, it will. If you ask it to erase all your system files, it will. If you're new at Debian/Linux, I really recommend you get used to using su/sudo before trying to log in as root in gdm.
I understand what your saying but I have a couple of things that I want to install (an HP program for printers and an accounting program) that have instructions to work from the root login so I would have to adjust those for su, and I am not good at that.
Thanks
Inky
Ah, I was using an old version of GDM. You're right, the setting isn't there anymore. From your problem, it does sound like you should be asking some questions about how su/sudo works instead. "su" makes you root. "sudo command" executes as root (only works if you've added your user in the sudoers file, or disallowed root at installation). "sudo -s" makes you root.

Post Reply