1. Linux
1.1. Installation
sudo apt-get install cifs-utils samba smbclient
sudo cp -a /etc/samba/smb.conf /etc/samba/smb.conf.org
sudo smbpasswd -a root (1)
sudo smbpasswd -a smru (2)
sudo /etc/init.d/nmbd restart
sudo /etc/init.d/smbd restart
| 1 | Type the root password in upper case for security reasons. |
| 2 | Type the same password as for the normal user account. |
1.2. Configuration of TBHF-ANC-MRM Samba Server
-
Install Samba Server.
|
When using vers-3.0 the mount command silently fails. |
sudo mkdir -p /home/Other
-
Change the workgroup = WORKGROUP line to workgroup = SMRU in the /etc/samba/smb.conf file.
-
Change the workgroup = smru.shoklo-unit.com line to workgroup = SMRU in the /etc/samba/smb.conf file.
-
Insert the following lines in the [global] section of the /etc/samba/smb.conf file.
# Disable insecure SMBv1 protocol. min protocol = SMB2 # Allow following symlinks outside share. unix extensions = no
-
Append the following lines to the /etc/samba/smb.conf file.
[Other$] acl allow execute always = True browseable = yes comment = Other create mask = 0644 directory mask = 0755 follow symlinks = yes path = /home/Other printable = no public = no read list = guest wide links = yes writable = yes
sudo /etc/init.d/nmbd restart sudo /etc/init.d/smbd restart smbclient -L //tbhf-anc-mrm (1) # smbclient -L //smru-app -U douwe (2) # vdir /home/Other # smbclient //tbhf-anc-mrm/Other$ (3) # dir # exit # sudo mount -t cifs -o iocharset=utf8,vers=3.0 //tbhf-anc-mrm/Other$ /mnt (4) # sudo mount -t cifs -o iocharset=utf8,domain=SMRU,user=Douwe,vers=2.0 //SMRU-HyperV01/Windows$ /mnt (4) # sudo vdir /mnt # sudo umount /mnt
| 1 | Type the smru samba password. |
| 2 | Type the douwe domain user account password. |
| 3 | Type the smru samba password. |
| 4 | Type the root samba password. |
1.3. Map network drive from Windows 7
-
Start Windows Explorer.
-
Select Tools > Map network drive.
Drive: W: Folder: \\tbhf-anc-mrm\Other$ □ Reconect at logon ■ Connect using different credentials -
Click Finish.
User name smru Password ******** □ Remember my credentials
-
Click OK.
-
Do your thing.
-
Select Tools > Disconnect network drive.
-
Select Other$ (\\tbhf-anc-mrm) (O:).
-
Click OK.
-
Close Windows Explorer.
1.4. Map network drive from Windows 10
-
Start File Explorer.
-
Select Home > Easy access > Map as drive.
Drive: W: Folder: \\tbhf-anc-mrm\Other$ □ Reconect at sign-in ■ Connect using different credentials -
Click Finish.
User name smru Password ******** □ Remember my credentials
-
Click OK.
-
Do your thing.
-
Select Tools > Disconnect network drive.
-
Right-click Other$ (\\tbhf-anc-mrm) (O:) and select Disconnect.
-
Click Yes.
-
Close File Explorer.
1.5. Map network drive from Mac OS X
-
Start Finder.
-
Select SHARED > tbhf-anc-mrm.
-
Click Connect As.
Connect as: □ Guest ■ Registered User Name: smru Password: ******** □ Remember this password in my keychain -
Click Connect.
-
Do your thing.
ls -al /Volumes/Other
-
Do your thing.
-
Click Disconnect.
-
Select ??? > Eject Window.
-
Close Finder.
1.6. Linux client
|
When using vers-3.0 the mount command silently fails. |
sudo apt-get install cifs-utils
sudo mkdir -p /media/sf_W_DRIVE
sudo chown root:smru /media/sf_W_DRIVE
sudo mount -t cifs -o iocharset=utf8,user=smru,vers=3.0 //tbhf-anc-mrm /Other$ /media/sf_W_DRIVE
sudo mount -t cifs -o iocharset=utf8,domain=SMRU,user=<User>,vers=2.0 //SMRU-HyperV01/Windows$ /media/sf_W_DRIVE
* dir /media/sf_W_DRIVE
sudo umount /media/sf_W_DRIVE
sudo mkdir -p /media/Windows sudo touch ~root/.smbcred-Windows sudo chmod 600 ~root/.smbcred-Windows sudo vdir ~root/.smbcred-Windows
-
Contents of the ~root/.smbcred-Windows file.
username=smru password=******** domain=SMRU
-
Append the following lines to the /etc/fstab file.
# SMRU ANC Server shares. //SMRU-HyperV01/Windows$ /media/Windows cifs credentials=/root/.smbcred-Windows,vers=2.0 0 0
1.7. Windows client
net use O: \\tbhf-anc-mrm\Other$ /P:No /User:smru
# dir O:\
2. Extended ACL attributes
# List all files with extended ACL attributes.
ls -alR . | grep '+ '
# Remove extended ACL attribute.
setfacl -bn <file>
# Remove all extended ACL attributes.
setfacl -bnR <dir>
ls -al /home/Other/Inventory/_Readme.txt
setfacl -bn /home/Other/Inventory/_Readme.txt
ls -al /home/Other/Inventory/_Readme.txt