tonychang-uk
Posts: 86
Joined: Mon Jun 18, 2012 1:42 pm

RASPBIAN STRETCH auto login as root not working

Tue Sep 12, 2017 11:18 am

in Jessie we can edit /etc/lightdm/lightdm.conf login as root and auto login

but in stretch can't login as this way.

How to auto login as root ?

User avatar
RaTTuS
Posts: 9423
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: RASPBIAN STRETCH auto login as root not working

Tue Sep 12, 2017 11:37 am

you don't want to log in as root under x
it is just the wrong way of everything
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

tonychang-uk
Posts: 86
Joined: Mon Jun 18, 2012 1:42 pm

Re: RASPBIAN STRETCH auto login as root not working

Tue Sep 12, 2017 10:27 pm

RaTTuS wrote:
Tue Sep 12, 2017 11:37 am
you don't want to log in as root under x
it is just the wrong way of everything
I want login as root under x , Jessie can use this way, but Stretch can't use this way.
any other way can login as root under x ? Thanks !

User avatar
RaTTuS
Posts: 9423
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: RASPBIAN STRETCH auto login as root not working

Wed Sep 13, 2017 7:00 am

before I answer this, can you explain to us
why you want to run as root under x
because what you are asking for is so monumentally insecure it is like <REDACTED>
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

tonychang-uk
Posts: 86
Joined: Mon Jun 18, 2012 1:42 pm

Re: RASPBIAN STRETCH auto login as root not working

Wed Sep 13, 2017 9:32 am

RaTTuS wrote:
Wed Sep 13, 2017 7:00 am
before I answer this, can you explain to us
why you want to run as root under x
because what you are asking for is so monumentally insecure it is like <REDACTED>
Because we need load driver for UART HAT, need use root for permission.
Pi user can't use some hardware resource.

tonychang-uk
Posts: 86
Joined: Mon Jun 18, 2012 1:42 pm

Re: RASPBIAN STRETCH auto login as root not working

Fri Sep 15, 2017 11:06 am

Any one know how to setting "RASPBIAN STRETCH auto login as root under x" ???

klricks
Posts: 4689
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: RASPBIAN STRETCH auto login as root not working

Fri Sep 15, 2017 1:04 pm

tonychang-uk wrote:
Fri Sep 15, 2017 11:06 am
Any one know how to setting "RASPBIAN STRETCH auto login as root under x" ???
Have you tried changing to root using su command under x?

First you need to set a root password:

Code: Select all

sudo passwd root
Then

Code: Select all

su
And enter the new root password
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

tonychang-uk
Posts: 86
Joined: Mon Jun 18, 2012 1:42 pm

Re: RASPBIAN STRETCH auto login as root not working

Sat Sep 16, 2017 12:51 pm

klricks wrote:
Fri Sep 15, 2017 1:04 pm
tonychang-uk wrote:
Fri Sep 15, 2017 11:06 am
Any one know how to setting "RASPBIAN STRETCH auto login as root under x" ???
Have you tried changing to root using su command under x?

First you need to set a root password:

Code: Select all

sudo passwd root
Then

Code: Select all

su
And enter the new root password
need automatic login as root, don't need input any password? got ideal how to setting??? Thanks!

knute
Posts: 261
Joined: Thu Oct 23, 2014 12:14 am

Re: RASPBIAN STRETCH auto login as root not working

Sun Sep 17, 2017 8:45 pm

tonychang-uk wrote:
Wed Sep 13, 2017 9:32 am
RaTTuS wrote:
Wed Sep 13, 2017 7:00 am
before I answer this, can you explain to us
why you want to run as root under x
because what you are asking for is so monumentally insecure it is like <REDACTED>
Because we need load driver for UART HAT, need use root for permission.
Pi user can't use some hardware resource.
So the driver only loads when you use X? You can't use a [DesktopEntry] file executed with sudo? You know that running X as root creates a whole host of possible issues?

Is your default user still pi? If it is then do this:

Click the Raspberry -> Preferences -> Raspberry Pi Configuration
Set Boot: To CLI
Set Auto login: Login as user 'pi'
Click the OK button

Edit pi's /home/pi/.profile file and put this at the end:

if [[ $(tty) == "/dev/tty1" && $ROOTX != "true" ]]; then
ROOTX="true"
export $ROOTX
sudo startx
fi

and reboot your computer.

It is moderately stable with nothing else running but who knows after you start installing drivers and other software.

Disclaimer: There is always a small risk of nuclear detonation if you run X as root.

asandford
Posts: 1601
Joined: Mon Dec 31, 2012 12:54 pm
Location: Ealing

Re: RASPBIAN STRETCH auto login as root not working

Mon Sep 18, 2017 1:24 am

RaTTuS wrote:
Wed Sep 13, 2017 7:00 am
before I answer this, can you explain to us
why you want to run as root under x
because what you are asking for is so monumentally insecure it is like <REDACTED>
This. Don't do it.

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 22 guests