LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 12-08-2004, 11:21 PM   #1
martincho
Member
 
Registered: Sep 2004
Location: Argentina
Distribution: Slackware 10.1, Knoppix 3.7 es, Debian 3.0
Posts: 37

Rep: Reputation: 15
Root Logins are not allowed


Hello All,

After install kde themes (kdeartwork and all the stuff needed) can't start kdm nor gdm.
Had to go to /etc/kde3 and run kdm.
Nice presentation and nice icons......but now only can login as user and can't log as root.
The message that I get when try to log as root is: " Root Logins are not allowed"
Anyway can run commands as root typing "su" and giving the root password.

I know that in this way it is safer but would like to know how to return to previous situation.....login as root.......and come back to this

Best Regards
Martin
 
Old 12-09-2004, 02:32 AM   #2
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
If you were in Mandrake Linux I would be able to tell you the way to do it immediately. But Debain does not have the Mandrake Control Center.

Maybe I can find something on google.... stay tuned.

---- Edit ----
And I did! Here is the link to it. Find the location of a file called kdmrc probably the easiest way would be
Code:
$ locate kdmrc
Mine is located in /usr/share/config/kdm/ . Here is my file:
Code:
[root@localhost kdm]# cat kdmrc
[General]
ConfigVersion=2.1
PidFile=/var/run/xdm.pid
Xservers=/etc/X11/xdm/Xservers

[Shutdown]
HaltCmd=/sbin/halt
LiloCmd=/sbin/lilo
LiloMap=/boot/map
RebootCmd=/sbin/reboot
UseLilo=true

[X-*-Core]
AllowNullPasswd=false
AllowRootLogin=false
AllowShutdown=Root
AutoReLogin=false
Reset=/etc/X11/xdm/GiveConsole
Resources=/etc/X11/xdm/Xresources
Session=/etc/X11/xdm/Xsession
Setup=/etc/X11/xdm/Xsetup_0
Startup=/etc/X11/xdm/TakeConsole
SystemPath=/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin/
UserPath=/usr/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/

[X-*-Greeter]
AntiAliasing=true
AuthComplain=false
ColorScheme=Plastik
DefaultUser=alex
EchoMode=NoEcho
FaceSource=AdminOnly
FailFont=Sans,12,-1,5,75,0,0,0,0,0
FocusPasswd=false
ForgingSeed=1069108915
GUIStyle=dotNET
GreetFont=Sans,24,-1,5,50,0,0,0,0,0
GreetString=Welcome to %n
GreeterPosFixed=false
GreeterPosX=0
GreeterPosY=0
HiddenUsers=nobody,root
Language=en_US
LogoArea=Clock
LogoPixmap=
MaxShowUID=65535
MinShowUID=500
PreselectUser=None
SelectedUsers=
ShowUsers=None
SortUsers=true
StdFont=Sans,12,-1,5,50,0,0,0,0,0
UseBackground=true

[X-:*-Core]
AllowNullPasswd=true
AllowRootLogin=true
AllowShutdown=None
NoPassEnable=false
NoPassUsers=

[X-:*-Greeter]
LoginMode=DefaultLocal

[X-:0-Core]
Authorize=true
AutoLoginEnable=false
AutoLoginUser=alex

[X-:1-Core]
Authorize=true

[Xdmcp]
Enable=false
Willing=/etc/X11/xdm/Xwilling
Xaccess=/etc/X11/xdm/Xaccess
Have a look what I made bold. Modifying that value should allow for root login. Of course save the file, and restart the window manager. Let me know if this resolved the problem

Last edited by student04; 12-09-2004 at 02:42 AM.
 
Old 12-09-2004, 08:13 AM   #3
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hi,

Check that you don't have a file called /etc/nologin... if yes, remove it

Oliv'
 
Old 12-09-2004, 11:16 AM   #4
McCloud
Member
 
Registered: Sep 2004
Distribution: Debian Etch
Posts: 179

Rep: Reputation: 30
Please, do NOT login as root. When you setup your machine correctly you don't need to have root access in KDE. Linux is NOT Windows.

And whenever you need root access, open a shell and do "su root" (For instance when you need to install applications or when you need to configure something). And whenever you need root access in a graphical application, use 'kdesu' to start it.

When I first started using Linux I also used to login as root. But it's just plain stupid, insecure and absolutely not necessary.

Good luck (and please, do not login as root )
 
Old 12-09-2004, 11:44 AM   #5
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Quote:
Originally posted by McCloud
Please, do NOT login as root. [...]

Good luck (and please, do not login as root )
I second that motion!

Actually, if you get used to it, you'll likely enjoy a non-graphical login much more than
the graphical thing, which just frustrates me. Sometimes there's a little routine maintenance
or something I want to check from the command line before actually logging in, and
the command-line login makes that a snap, where the graphical one makes it impossible.

To switch to a command-line login you just change the default runlevel from "5" to "3"
in /etc/inittab.

Just my two cents' worth on this issue.
 
Old 12-09-2004, 12:43 PM   #6
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
If you want to work on files via root then use the file manager. In my system using kde its K -> system -> more programs -> file manager it will then ask for you root password.
 
Old 12-09-2004, 12:57 PM   #7
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 383

Rep: Reputation: 31
Quote:
Originally posted by jonr

To switch to a command-line login you just change the default runlevel from "5" to "3"
in /etc/inittab.

This is a Redhat/Mandrake-centric viewpoint when it comes to runlevels. The default runlevel in debian is typically runlevel 2 in the first place. In order to remove the graphical login within debian, all you need to do is remove the symbolic link to gdm in /etc/rc2.d, typically S99gdm.
 
Old 12-09-2004, 11:31 PM   #8
martincho
Member
 
Registered: Sep 2004
Location: Argentina
Distribution: Slackware 10.1, Knoppix 3.7 es, Debian 3.0
Posts: 37

Original Poster
Rep: Reputation: 15
Thumbs up

Hey!

Many thanks to all of you for your replies, are quite interesting and usefull.

First of all, Student04: yes, it works with your advice. It is just what I wanted.

2- McCloud & Jonr: Thanks a lot for your recommendation, I agree with you since read somewhere that connected while logged as root give the chance to anyone modify your system if can access. Agree also that Linux is not Windows......that is the main reason why I want to learn, and indeed I do...now I know how can allow/deny "root logins"

3- TigerOC, Wells & Oliv': Thanks a lot for your comments, will take them into account (in fact I'm saving the page)

Regards
Martin
 
Old 01-30-2005, 07:26 PM   #9
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
Hi Guys,

Great article, and very helpful!!!!!!!!!!!!!!!!!!!

TigerOC - the only reason I have ever logged into root was for this graphical interface, excellent advice thankyou!


McCloud - I tried your suggestion and recieved this:-


evoffice:/# kdesu
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdesu: cannot connect to X server :0.0
evoffice:/#


Any idea's? I have not got my Samba setup properly, but I not sure if this is linked.


Also, if I wanted to edit a file in command line, how do I go about it. The only reference to this type of command is for dos. I don't want to be stuck to a graphical interface, as I see the power of the command line.

Cheers

Evan
 
Old 01-30-2005, 07:48 PM   #10
foamrotreturns
Member
 
Registered: Jul 2004
Location: Ft. Collins, CO
Distribution: Knoppix, PHLAK, FC2, Debian, Mandrake
Posts: 33

Rep: Reputation: 15
Quote:
Originally posted by aikidoist72

Also, if I wanted to edit a file in command line, how do I go about it. The only reference to this type of command is for dos. I don't want to be stuck to a graphical interface, as I see the power of the command line.

Cheers

Evan
Don't know how to answer your first question - this thread was the first I ever heard of the kdesu command as well. The kdesu --help command didn't give me much information either and there is no man page for it.
As to your second question, there are a few good command line editors for ascii files. one is "vi" which is called like this:
vi <filename>
this will take you into viewing the file mode. if you want to edit it, hit the "I" key. This is insert mode. Edit the text the way you want to. To get out of insert mode, hit escape. Then, to save, make a colon, and type the letter "w" for "write." If you want to save and exit, just throw in a "q" at the end to look like this: ":wq"
Those are the basic commands for vi.
you can also use joe. joe is called like this:
joe <filename>
joe has a very detailed list of commands in it, so explaining them here would be unnecessary. Joe greatly resembles old-skool DOS WordPerfect. If you miss the glory days, head over into joe and have a look around.
 
Old 01-30-2005, 07:55 PM   #11
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
Quote:
Originally posted by aikidoist72
Also, if I wanted to edit a file in command line, how do I go about it. The only reference to this type of command is for dos. I don't want to be stuck to a graphical interface, as I see the power of the command line.
You can use "vi" or "vim" or "nano" or "pico". For example
Code:
# vim /etc/inittab
would open up the vim editor with the /etc/inittab file loaded. I would recommend that you try pico or nano first as they are more straight forward with usage, but vi/vim is more powerful (do some reading on the net first).

*edit*
darn someone posted before me...
 
  


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
root login not allowed palmoswince Linux - Newbie 8 05-12-2008 10:22 AM
root login not allowed allelopath Linux - Software 6 09-07-2005 05:34 PM
ssh logins not allowed - keyboard something student04 Linux - Networking 10 01-04-2005 05:03 AM
ssh access allowed only to root user? zovres Linux - Newbie 5 09-25-2003 05:19 PM
Not allowed to play kjezz game on non-root user's account rdaves@earthlink.net Linux - General 3 07-13-2001 07:58 PM


All times are GMT -5. The time now is 12:22 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration