Enable ssh user

Operating system: CentOS
OS version: 8.2

Enabled chroot jail
I want give a user (administrator login created with the virtual server), ssh access to his home.
What I get if try to login is:

pam_systemd(sshd:session): Failed to create session: Start job for unit user …

Seems something related to additional groups.
Below full journalctl -ex
Any hints?
Regards, P.

– The leading process of the session is 108236.
Nov 17 00:50:45 vhost382 sshd[108236]: pam_unix(sshd:session): session opened for user root by (uid=0)
Nov 17 00:51:26 vhost382 sshd[108926]: Accepted password for vhost382 from 192.168.2.81 port 35358 ssh2
Nov 17 00:51:26 vhost382 systemd[1]: Created slice User Slice of UID 1007.
– Subject: Unit user-1007.slice has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit user-1007.slice has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 systemd[1]: Started /run/user/1007 mount wrapper.
– Subject: Unit user-runtime-dir@1007.service has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit user-runtime-dir@1007.service has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 systemd[1]: Starting User Manager for UID 1007…
– Subject: Unit user@1007.service has begun start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit user@1007.service has begun starting up.
Nov 17 00:51:26 vhost382 systemd[1]: Started Session 105 of user vhost382.
– Subject: Unit session-105.scope has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit session-105.scope has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 systemd-logind[788]: New session 105 of user vhost382.
– Subject: A new session 105 has been created for user vhost382
– Defined-By: systemd

– Support: https://access.redhat.com/support
– Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat

– A new session with the ID 105 has been created for the user vhost382.

– The leading process of the session is 108926.
Nov 17 00:51:26 vhost382 systemd[108978]: pam_unix(systemd-user:session): session opened for user vhost382 by (uid=0)
Nov 17 00:51:26 vhost382 systemd[108978]: dbus.socket: Cannot add dependency job, ignoring: Access denied
Nov 17 00:51:26 vhost382 systemd[108978]: Reached target Sockets.
– Subject: Unit UNIT has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit UNIT has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 systemd[108978]: Reached target Paths.
– Subject: Unit UNIT has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit UNIT has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 sshd[108926]: pam_unix(sshd:session): session opened for user vhost382 by (uid=0)
Nov 17 00:51:26 vhost382 systemd[108978]: grub-boot-success.timer: Refusing to start, unit to trigger not loaded.
Nov 17 00:51:26 vhost382 systemd[108978]: Failed to start Mark boot as successful after the user session has run 2 minutes.
– Subject: Unit UNIT has failed
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit UNIT has failed.

– The result is failed.
Nov 17 00:51:26 vhost382 systemd[108978]: Reached target Timers.
– Subject: Unit UNIT has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit UNIT has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 systemd[108978]: Reached target Basic System.
– Subject: Unit UNIT has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit UNIT has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 systemd[108978]: Reached target Default.
– Subject: Unit UNIT has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit UNIT has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 systemd[108978]: Startup finished in 28ms.
– Subject: User manager start-up is now complete
– Defined-By: systemd
– Support: https://access.redhat.com/support

– The user manager instance for user 1007 has been started. All services queued
– for starting have been started. Note that other services might still be starting
– up or be started at any later time.

– Startup of the manager took 28413 microseconds.
Nov 17 00:51:26 vhost382 systemd[1]: Started User Manager for UID 1007.
– Subject: Unit user@1007.service has finished start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit user@1007.service has finished starting up.

– The start-up result is done.
Nov 17 00:51:26 vhost382 jk_chrootsh[108988]: now entering jail /home/chroot/160556940288217 for user vhost382 (1007) with arguments
Nov 17 00:51:26 vhost382 jk_chrootsh[108988]: abort, failed to set additional groups: Operation not permitted
Nov 17 00:51:26 vhost382 sshd[108987]: Received disconnect from 192.168.2.81 port 35358:11: disconnected by user
Nov 17 00:51:26 vhost382 sshd[108987]: Disconnected from user vhost382 192.168.2.81 port 35358
Nov 17 00:51:26 vhost382 sshd[108926]: pam_unix(sshd:session): session closed for user vhost382
Nov 17 00:51:26 vhost382 systemd-logind[788]: Session 105 logged out. Waiting for processes to exit.
Nov 17 00:51:26 vhost382 systemd-logind[788]: Removed session 105.
– Subject: Session 105 has been terminated
– Defined-By: systemd
– Support: https://access.redhat.com/support
– Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat

– A session with the ID 105 has been terminated.
Nov 17 00:51:26 vhost382 systemd[1]: user-runtime-dir@1007.service: Unit not needed anymore. Stopping.
Nov 17 00:51:26 vhost382 systemd[1]: Stopping User Manager for UID 1007…
– Subject: Unit user@1007.service has begun shutting down
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit user@1007.service has begun shutting down.
Nov 17 00:51:26 vhost382 systemd[108978]: Failed to enqueue exit.target job: Access denied

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.