Voor zover ik weet heb ik niks gedaan in smb signing.
wat ik precies gedaan hebt is het volgende:
Let op dit is voor stage geweest en alles moest in het engels. Rood is de getypte code.
There are a few actions we need to take before we can start mounting using cifs.
To make sure samba is installed type the following into the terminal:
sudo aptitude install smbfs
Now we need to create a location where the samba share can mount. Change "sharename" to the name you want to give the folder. By creating the mount point in the /media folder, you will get a nifty icon to appear on your desktop like when a cdrom mounts.
sudo mkdir /media/sharename
To mount a windows share on a DHCP network, it is convenient to be able to mount by netbios name, so you don't have to modify the mount parameters every time you reboot your network. This can be easily enabled by doing the following:
Edit your nsswitch file
sudo nano /etc/nsswitch.conf
Search through the file and look for the line that looks something like so:
hosts: files dns and add "wins" to the end of the line so it looks something like this:
hosts: files wins dns
Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.
note: "wins" MUST come before "dns" if you are using the openDNS service.
Now you'll need to install winbind
sudo aptitude install winbind
Reboot your computer.
Log in as root by typing root as user name and the root password. Then you can share the folder \root\media\Backup
If you don’t log is as root you won’t be able to share the folder because you created the folder as root (sudo) and only the owner can share it.
Test with an other computer if you can access the share.
Now we can make the share persistent
If your samba server requires a password to access the shared files, you should create a credentials file so the username and password are hidden from prying eyes.
If you don't have password protected access to your samba share, skip this section and start with the line that says "Now we edit fstab:".
To create a credentials file, do the following:
sudo nano /root/.smbcredentials
WARNING!!! Do not use a GUI text editor (like KATE) to create this file!!!
Add the following lines (change winusername and winpassword to the correct username and password for the samba/windows server you want to connect to):
username=winusername
password=winpassword
Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.
Now, change the permissions of the file so only root can read and edit it:
sudo chmod 700 /root/.smbcredentials
Now we edit fstab:
sudo nano /etc/fstaband
at the end of the file, insert one (1) of the following 3 lines according to your needs. Make sure you change "netbiosname" and "sharename" to the correct names.
For a password protected share with read/write permission.
//netbiosname/sharename /media/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
For a non-password protected share with read/write permission use this instead:
//netbiosname/sharename /media/sharename cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
For read only guest access:
//netbiosname/sharename /media/sharename cifs guest,iocharset=utf8 0 0
Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.
note: if you've used a text editor other than nano, make sure that there is a blank line at the end of this file!!!
Finally, test your settings to make sure they work:
sudo mount -a
Now, your samba shares will be mounted every time you start the computer. If you are not connected to your network when you boot, this will not cause problems. The share will simply not appear on your desktop.