Hi,
I have configured TigerVNC on Ubuntu server 20.04 and the ldap_client.
To start the different sessions, I created service files in /etc/systemd/system :
vncserv...@1.service
vncserv...@2.service
...
An example of the content of the :
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
User=user1
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver :%i -geometry 1440x900 -alwaysshared -fg -PlainUsers * -SecurityTypes TLSPlain
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
When I enable the service and start it manually with for example the following command:
sudo systemctl status vncserv...@2.service
The session starts as it should, without errors.
On the other hand, when I reboot, the sessions do not start and produce the following error:
Jul 22 11:36:52 vpaavpvm0024 systemd[1]: Starting Remote desktop service (VNC)...
Jul 22 11:36:52 vpaavpvm0024 systemd[1112]: PAM failed: Authentication failure
Jul 22 11:36:52 vpaavpvm0024 systemd[1112]: vncserv...@1.service: Failed to set up PAM session: Operation not permitted
Jul 22 11:36:52 vpaavpvm0024 systemd[1112]: vncserv...@1.service: Failed at step PAM spawning /bin/sh: Operation not permitted
Jul 22 11:36:52 vpaavpvm0024 systemd[1]: vncserv...@1.service: Control process exited, code=exited, status=224/PAM
Jul 22 11:36:52 vpaavpvm0024 systemd[1]: vncserv...@1.service: Failed with result 'exit-code'.
Jul 22 11:36:52 vpaavpvm0024 systemd[1]: Failed to start Remote desktop service (VNC).
Do you have any idea of the problem?
Thanks in advance for your help.
Ludo