Date created: Friday, November 10, 2017 11:55:24 AM. Last modified: Thursday, October 6, 2022 1:49:11 PM



# Test SMB connectivity
sudo yum install samba-client.x86_64
smbclient "// With Space In Name" -U ADDOMAIN\\

# Mount share
sudo yum install cifs-utils
sudo mkdir /media/fs
sudo mount.cifs -o user=username,pass=5up3r53cr37,dom=ADDOMAIN "// With Space In Name" /media/fs

sudo umount /media/fs



Accessing shares:

sudo apt-get install cifs-utils
# Might need a restart after the above, to load the cifs kernel module, check with 'lsmod | grep cifs'

# One-time mount a guest share which doesn't require authentication
sudo mount -t cifs -o user=guest,pass=pass,dom=WORKGROUP "// Share" /media/nas

# Add a guest share to the fstab with the following entry, note the space in the share name is escaped with: \040
//\040Share /media/nas cifs guest,uid=1000 0 0
# Test with
sudo mount -a


Adding new users:

# They need to exist as system users too
sudo useradd -NM -s /bin/false -p abc123 smb_user
sudo smbpasswd -a smb_user

Previous page: Bash Profile
Next page: 'curl' Notes