1

We have some CentOS 7.4 machines that have been configured to authenticate with a local OpenDirectory (macOS server) machine.

We want to use user authentication to allow VNC access instead of using an additional VNC specific password.

We are using Systemd to manage the VNC process and spawning a persistent VNC session so that users may reconnect.

With our current setup LDAP users can connect to VNC, but local users cannot. How do we fix this?

/etc/systemd/system/persistent-xvnc.socket:

[Unit]
Description=XVNC Persistent Server

[Socket]
ListenStream=5901
Accept=false

[Install]
WantedBy=sockets.target

/etc/systemd/system/persistent-xvnc.service:

[Unit]
Description=XVNC Persistent Per-Connection Daemon

[Service]
ExecStart=-/usr/bin/Xvnc -inetd -query localhost -geometry 1024x768 -depth 24 -once -desktop %H -PlainUsers * -SecurityTypes Plain,TLSPlain -PAMService login
User=nobody
StandardInput=socket
StandardError=syslog

LDAP was configured with authconfig:

authconfig --enableforcelegacy --update
authconfig --enableldap --enableldapauth --ldapserver="od.example.com" --ldapbasedn="dc=od,dc=example,dc=com" --enablemkhomedir --update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.