Login to 0136-ict-prxm×50114 Just connecting Session Xorg username nvidia password ОК…
- User
Login to 0136-ict-prxm×50114 Just connecting Session Xorg username nvidia password ОК Cancel
Connection Log connecting to sesman ip 127.0.0.1 port 3350 sesman connect ok sending login info to session manager, please wait... login failed for display o OK
Last login: Thu Nov 7 23:21:28 2024 from 76.103.135.209 nvidia@0136-ict-prxmx50114:~$ sudo tail -f /var/log/xrdp-sesman.log [20241108-12:27:24] [INFO ] Socket 8: AF_INET6 connection received from ::1 port 42118 [20241108-12:27:26] [ERROR] pam_authenticate failed: Authentication failure [20241108-12:27:26] [INFO ] Username or password error for user: nvidia [20241108-12:27:26] [ERROR] sesman_data_in: scp_process_msg failed [20241108-12:27:26] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans [20241108-12:27:44] [INFO ] Socket 8: AF_INET6 connection received from ::1 port 50202 [20241108-12:27:45] [ERROR] pam_authenticate failed: Authentication failure [20241108-12:27:45] [INFO ] Username or password error for user: nvidia [20241108-12:27:45] [ERROR] sesman_data_in: scp_process_msg failed [20241108-12:27:45] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
- Assistant
It appears that you're experiencing an authentication failure when attempting to log in to your system via xrdp using the username
nvidia. The error messages suggest that the PAM (Pluggable Authentication Modules) authentication is failing for this user. Let's work through some steps to troubleshoot and resolve this issue.1. Verify Username and Password
- Ensure Correct Credentials: Double-check that you're entering the correct username and password. Remember that both are case-sensitive.
- Test Local Login: Try logging in directly on the machine (e.g., via SSH) with the same credentials to confirm that the account is functioning properly.
2. Check User Account Status
- Account Lockout: Verify that the
nvidiaaccount is not locked or expired.sudo passwd -S nvidia- The output should show "Password set, user can change password, account is active."
- Unlock Account (if necessary):
sudo passwd -u nvidia
3. Review PAM Configuration for xrdp-sesman
- PAM Config File: Inspect the PAM configuration file for
xrdp-sesman, typically located at/etc/pam.d/xrdp-sesman. - Default Configuration: Ensure it contains the appropriate modules for authentication. A typical configuration might look like:
auth required pam_unix.so account required pam_unix.so session required pam_unix.so password required pam_unix.so - Compare with System Defaults: You can compare it with other PAM config files (e.g.,
/etc/pam.d/login) to ensure consistency.
4. Check xrdp-sesman Permissions and Ownership
- Verify File Permissions:
sudo ls -l /etc/xrdp/sesman.ini- Ensure that the file is readable by the
xrdpuser or appropriate service account.
- Ensure that the file is readable by the
- Correct Permissions (if necessary):
sudo chown root:xrdp /etc/xrdp/sesman.ini sudo chmod 640 /etc/xrdp/sesman.ini
5. Review
sesman.iniConfiguration- Security Settings: Open
/etc/xrdp/sesman.iniand check under the[Security]section.- Allow Groups: Ensure that if
AlwaysGroupCheckis set totrue, thenvidiauser is part of the allowed groups.AlwaysGroupCheck=true AllowGroups=remote_desktop_users - Modify Groups (if necessary):
sudo usermod -aG remote_desktop_users nvidia
- Allow Groups: Ensure that if
- Restricting Access: If
DenyGroupsorDenyUsersare specified, make sure thenvidiauser is not listed there.
6. Examine System Authentication Logs
- Authentication Logs: Check system logs for additional authentication errors.
- Debian/Ubuntu:
sudo tail -f /var/log/auth.log - RHEL/CentOS:
sudo tail -f /var/log/secure - Look for entries related to
pam_unix,xrdp-sesman, ornvidia.
- Debian/Ubuntu:
7. Verify SSH Key Permissions (if using SSH keys)
- SSH Authentication: If you're using SSH keys for authentication, ensure that the
.sshdirectory and its contents have the correct permissions.ls -ld ~/.ssh ls -l ~/.ssh- Permissions:
.sshdirectory:700authorized_keys:600
- Correct Permissions (if necessary):
chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
- Permissions:
8. Check SELinux or AppArmor Policies
- SELinux:
- Status:
sudo getenforce- If it's
Enforcing, SELinux might block xrdp.
- If it's
- Set to Permissive (for testing purposes):
sudo setenforce 0 - Permanent Change (if necessary, not recommended for production without proper analysis):
Edit
/etc/selinux/configand setSELINUX=permissive.
- Status:
- AppArmor:
- Disable AppArmor Profile (for xrdp, if necessary):
sudo aa-complain /etc/apparmor.d/usr.bin.xrdp
- Disable AppArmor Profile (for xrdp, if necessary):
9. Restart xrdp Services
- Restart Services: Sometimes, services need to be restarted to apply changes.
sudo systemctl restart xrdp sudo systemctl restart xrdp-sesman
10. Update xrdp and Related Packages
- System Update:
sudo apt update && sudo apt upgrade - Reinstall xrdp (if necessary):
sudo apt install --reinstall xrdp
11. Enable Debug Logging for xrdp-sesman
- Increase Log Verbosity:
- Edit
/etc/xrdp/sesman.iniand setLogLevel=DEBUGunder the[Logging]section. - Restart xrdp services:
sudo systemctl restart xrdp-sesman - Analyze Logs: Check
/var/log/xrdp-sesman.logfor detailed error messages.
- Edit
12. Verify xrdp and Xorg Integration
- Ensure Xorg is Installed:
sudo apt install xorgxrdp xserver-xorg-core - Session Configuration:
- Check
/etc/xrdp/startwm.shto ensure it correctly starts the desired window manager or desktop environment. - A typical
startwm.shmight include:#!/bin/sh if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi startxfce4
- Check
13. Test with a Different User Account
- Create a Test User:
sudo adduser testuser - Attempt Login: Try logging in via xrdp with the
testuseraccount to see if the issue is specific to thenvidiauser.
14. Firewall and Port Configuration
- Check Firewall Settings:
sudo ufw status - Allow xrdp Ports (if necessary):
sudo ufw allow 3389/tcp
15. Consult Documentation and Community Resources
- xrdp Documentation: Review the official xrdp documentation for any known issues or additional configuration steps.
- Community Forums: Search forums and Q&A sites like Stack Overflow or Unix & Linux Stack Exchange for similar issues.
Note: Always be cautious when modifying system configurations. It's advisable to back up configuration files before making changes. If you're in a production environment, consider scheduling downtime or performing these actions during maintenance windows.
If after all these steps the issue persists, there might be a deeper system-level problem. In that case, providing detailed logs and configurations to a system administrator or seeking professional support might be the best course of action.