- Install smbfs:
sudo apt-get install smbfs
- create the directory that will be mounted to the network drive, let's say /windows.
- Create a file containing the account to access the shared directory in /etc/cifspsw in the form:
username=$(user)
password=$(password)
It is better if you remove access to other users for this file:sudo chmod og-wr /etc/cifpsw
- Edit /etc/fstab and add the lines:
$ip/$(shared directory) /windows cifs noauto,exec credentials /etc/cifpsw 0 0
This line informs that the /windows directory will be mapped to the ip/shared directory folder.
Your configuration is ready, to mount the disk, simply write:
sudo mount /windows
Information: You need to be root to do all these actions: you need to start all the command with the sudo command.
No comments:
Post a Comment