You are not logged in.

#1 2013-04-12 16:11:50

osymandias
Member
Registered: 2013-04-12
Posts: 4

Automatic login to virtual console doesn't create a 'session'

I'm running an instance of Arch inside an LXC container. It's basically being used as a lightweight virtualisation approach, and so I have a wrapper program that spins up the instance, configures it, and drops the user in. As such, the user should be automatically logged in on boot.

I'm following the method listed at https://wiki.archlinux.org/index.php/Au … al_console and it works fine; however, it doesn't register a 'session' (as I understand it): loginctl shows nothing. This means I can't shut down the machine as a regular user.

I was previously starting a getty on /dev/console instead of at /dev/tty1, and this was correctly registering a session, but would hang as soon as you ran 'vi'. If vi was killed, the terminal size would shrink to a fraction of its existing size until fixed with 'reset'.

Solving either of these problems would be great, if anybody has any ideas! I have polkit (1.09) installed.

Offline

#2 2013-04-12 16:40:08

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,148

Re: Automatic login to virtual console doesn't create a 'session'

please show outputs of loginctl & systemctl list-units | grep polkit


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2013-04-15 09:12:59

osymandias
Member
Registered: 2013-04-12
Posts: 4

Re: Automatic login to virtual console doesn't create a 'session'

As I say, loginctl gives no results:

   SESSION        UID USER             SEAT            

0 sessions listed.
systemctl list-units | grep polkit

also returns nothing, which I wasn't expecting. Some more detail...

$ systemctl status polkit
polkit.service - Authorization Manager
	  Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
	  Active: inactive (dead)
	    Docs: man:polkit(8)

I can manually start polkit, and then get:

# systemctl status polkit
polkit.service - Authorization Manager
	  Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
	  Active: active (running) since Mon 2013-04-15 09:15:20 UTC; 6s ago
	    Docs: man:polkit(8)
	Main PID: 98 (polkitd)
	  CGroup: name=systemd:/system/polkit.service
		  └─98 /usr/lib/polkit-1/polkitd --no-debug

Though I also get these errors in the journalctl log:

Apr 15 09:15:20 archibald polkitd[98]: Loading rules from directory /etc/polkit-1/rules.d
Apr 15 09:15:20 archibald polkitd[98]: Error opening rules directory: Error opening directory '/etc/polkit-1/rules.d': Permission denied (g-file-error-quark, 2)
Apr 15 09:15:20 archibald polkitd[98]: Loading rules from directory /usr/share/polkit-1/rules.d
Apr 15 09:15:20 archibald polkitd[98]: Error opening rules directory: Error opening directory '/usr/share/polkit-1/rules.d': Permission denied (g-file-error-quark, 2)

Last edited by osymandias (2013-04-15 09:18:11)

Offline

#4 2013-04-15 12:44:03

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Automatic login to virtual console doesn't create a 'session'

The fact that loginctl doesn't show anything usually means that your pam config is messed up. Make sure you have merged all *.pacnew files in /etc/pam.d/, otherwise try reinstalling pambase, shadow and util-linux (not sure which one is responsible, but most of the files in /etc/pam.d are from these packages).

Offline

#5 2013-04-15 14:04:53

osymandias
Member
Registered: 2013-04-12
Posts: 4

Re: Automatic login to virtual console doesn't create a 'session'

I don't have any pacnew files in /etc/pam.d (this is pretty much a fresh installation), but I'll try the other things. Note that loginctl will show my session if I come in on /dev/console rather than /dev/tty1.

Offline

Board footer

Powered by FluxBB