LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-22-2018, 04:36 AM   #1
susja
Member
 
Registered: May 2011
Posts: 111

Rep: Reputation: 1
Start system as particular user


Hello
I am running Ubuntu 16.04 LTE
I have two accounts e.g. user1 and user2
Every time I reboot my system it starts as user2 which causes the issues for me.
Question:
How could I force Ubuntu start after reboot as user1 every time?
Thanks
 
Old 11-22-2018, 05:33 AM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,044

Rep: Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332
Linux boots and starts as a service, not as a user. When you start a SESSION on Linux you log in (explicitly or implicitly) as a user. I have never enabled the auto-logon features of a linux system for security reasons, but such features can be turned off. Without auto-logon you will need to enter the user name and password to start your session.

See if that does nto get you started in the right direction.
 
Old 11-22-2018, 05:51 AM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
Searching on the internet for ubuntu 16.04 auto login provides the following result:

https://askubuntu.com/questions/1002...u-16-04-server

Is that of use to you?
 
Old 11-22-2018, 06:26 AM   #4
susja
Member
 
Registered: May 2011
Posts: 111

Original Poster
Rep: Reputation: 1
Sorry for not being clear
It’s not auto login issue
The issue is that default user after rebooting is user2 while I need user1
Hence my request is how to force to make default user after restart user1?
Thanks
 
Old 11-22-2018, 06:28 AM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
But how can your system "start as user2" if there is no auto login?

Do you mean that user2 is presented as the default option in the login window?
 
Old 11-22-2018, 06:32 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,083

Rep: Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141
what do you mean by default user at all? Is this GUI, a login screen, a full desktop, a console or what? What started as user2 ???
 
Old 11-22-2018, 07:15 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ArcoLinux
Posts: 9,141

Rep: Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939
if you got a config file for your login manager that sets the "default" user to show up every time you reboot, no matter what.
or
if you got a config file that your login manager that sets up the "default" user to the last user that was logged in and rebooted, or shut down the system to show back up again upon restarting.

Then you'll have to edit that config file, and or do some elaborate scripting, maybe using sed to put your user1 back in the driver seat every time your system starts due to that config file always resetting the "default" user to the one you do not want in the driver seat upon starting your system, which btw is highly unlikely that is taking place.

so the second elaborate script would cause your login manager to always set the user you want in the drivers seat every time you go to log in to set that as the "default" user to be that user.

default behavior of the login manager is what then needs to be changed. Mostly by some elaborate means to do so as their default behavior is either set by hard code manipulated by a config file, or it cannot be manipulated by any other means then to go in and change the source code itself. Then do not update it because the update will over write the work done on it.

you could go as far as ripping out the login manager then using startx instead. So now you have to type in what user it is, therefore eliminating the user from showing up on the login page of the login manager.

Last edited by BW-userx; 11-22-2018 at 07:16 AM.
 
Old 11-22-2018, 07:58 AM   #8
susja
Member
 
Registered: May 2011
Posts: 111

Original Poster
Rep: Reputation: 1
Well Folks
Thanks for all your responses. Appreciate it.
Actually I was able myself using GUI change default user in settings from user2 to user1 hence I don’t have this issue anymore.
But it revealed another one ��
I use this computer only at home and only connect to it via VNC hence I want it auto login after rebooting. Otherwise network is not connected and I can’t VNC.
Hence my last question is:
How could I enable auto login after reboot?
Thanks
P.S. in System Settings- User accounts I’ve setup user1 to login automatically but when machine starts I still see desktop with the user1 at prompt but not logged in.
How to force it auto login?
 
Old 11-22-2018, 08:06 AM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ArcoLinux
Posts: 9,141

Rep: Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939Reputation: 1939
what login manager are you using? look in its config file(s) for something called or close to auto login=(users name)
 
Old 11-22-2018, 08:11 AM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861Reputation: 2861
Quote:
Originally Posted by susja View Post
Well Folks
Thanks for all your responses. Appreciate it.
Actually I was able myself using GUI change default user in settings from user2 to user1 hence I don’t have this issue anymore.
In order to help people who have the same issue in the future, how exactly did you do this?
 
Old 11-22-2018, 12:11 PM   #11
susja
Member
 
Registered: May 2011
Posts: 111

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by hydrurga View Post
In order to help people who have the same issue in the future, how exactly did you do this?
I simply used only GUI interface.
I selected System Settings , then “user accounts”. Then I selected user I was interested in I.e. user1 as ‘on’ and user2 as ‘off’
That’s it.
Now when it started it defaulted to user1
 
1 members found this post helpful.
Old 11-30-2018, 04:43 AM   #12
Scott R. Fiore
LQ Newbie
 
Registered: Nov 2018
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by susja View Post
Well Folks
Thanks for all your responses. Appreciate it.
Actually I was able myself using GUI change default user in settings from user2 to user1 hence I don’t have this issue anymore.
But it revealed another one ��
I use this computer only at home and only connect to it via VNC hence I want it auto login after rebooting. Otherwise network is not connected and I can’t VNC.
Hence my last question is:
How could I enable auto login after reboot?
Thanks
P.S. in System Settings- User accounts I’ve setup user1 to login automatically but when machine starts I still see desktop with the user1 at prompt but not logged in.
How to force it auto login?

Did u find a Solution Susja ? if you got a config file that your login manager that sets up the "default" user to the last user that was logged in and rebooted, or shut down the system to show back up again upon restarting.

_____
 
  


Reply

Tags
account, rebooting


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
How to Know a particular user is a Normal User or Remote(NIS) User in Redhat Linux? madhu.luck67@gmail.com Red Hat 4 05-14-2017 06:32 PM
Command to find mails sent by particular user on a particular date on centos 6 SarahGurung Linux - Server 1 06-03-2015 01:54 PM
[SOLVED] Block outgoing for particular user at particular time using iptables nitya Linux - Newbie 9 02-21-2013 08:11 PM
Replace a particular field in a particular line with user input using awk Divyavec Linux - Newbie 7 08-09-2012 09:23 AM
how to restrict one particular user to access one particular folder? Xeratul Linux - Newbie 6 02-06-2007 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration