Identify and fix pluggable authentication (PAM) issues

Hands-On Lab

 

Photo of Michael Christian

Michael Christian

Course Development Director in Content

Length

01:00:00

Difficulty

Advanced

In this exercise, you will need to troubleshoot and resolve authentication issues preventing Samba access.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Identify and fix pluggable authentication (PAM) issues

Introduction

In this exercise, you will need to troubleshoot and resolve authentication issues preventing Samba access.

Resolve authentication issues preventing the Samba user cloud_user from listing the Samba shares on the localhost using the password "Welcome1".

Solution

Start by logging in to the lab server using the credentials provided on the hands-on lab page:

ssh cloud_user@PUBLIC_IP_ADDRESS

Become the root user:

sudo su -

Verify the Samba service

  1. Verify the service is running:

    systemctl status smb
  2. Attempt to view the listing of shares on the localhost:

    smbclient -U cloud_user -L localhost

    Password: Welcome1

Resolve authentication issue

  1. Check /var/log/secure for any errors:

    tail /var/log/secure
  2. Check the Samba logs for any errors:

    tail /var/log/samba/log.smbd
  3. View the PAM service file:

    cat /etc/pam.d/samba
  4. Verify the package to see if any PAM files are changed:

    rpm -V samba
  5. Move the changes PAM file to /root/samba.pam.old:

    mv /etc/pam.d/samba /root/samba.pam.old
  6. Reinstall Samba to restore the original PAM file:

    yum reinstall -y samba
  7. Restart the Samba service:

    systemctl restart smb
  8. View the listing of shares on the localhost:

    smbclient -U cloud_user -L localhost

Conclusion

Congratulations, you've completed this hands-on lab!