Understanding a service well enough to troubleshoot it is an essential skill as a System Administrator. In this lab, we’ll go over troubleshooting a SAMBA installation.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Ensure the user is added to Samba correctly
pdbedit -L
Shows us that there are no Samba users on the system.
smbpasswd -a pinehead
Fails because there is no
pinehead
user on the system.useradd pinehead smbpasswd -a pinehead pdbedit -L
Now we have a Samba user named
pinehead
. Re-running the mount command works.- Ensure the mount is writable.
- First, we need to add the following line to
/etc/samba/smb.conf
:read only = no
- Additionally, we need to run these commands to make sure the
/opt
directory (specified in thesmb.conf
file) is eligible for writing bypinehead
through Samba.
chgrp pinehead /opt chmod g+w /opt chcon -t samba_share_t /opt
Once those are done, we can run
systemctl restart smb
and try totouch /mnt/test
. It should work perfectly!- First, we need to add the following line to