Hi all!
To sumerise all steps up for accessing a drive on a Windows machine from a Raspberry (or most probably from any other Linux machine for that matter):
- 1: Create a share on the Windows machine. This can either be a drive or a directory on a (fixed!) drive. I called mine 'D-partition'.
For this to be accessible it MUST have a password with the account! I created an account especially for this complete with password. I gave this account the name 'Deler' with password '9725'.
Of course this step is not neccessary if your account already has a password, in which case you use your accountname and the accompanying password.
It is a good idea (read: it won't hurt) if you also note the workgroup name (which on Windows defaults to 'WORKGROUP').
I want this share to be visible on the Raspberry's desktop as 'Win10'.
- 2: On your Raspberry create a file like this:and provide these details, which originate from step 1:- 3: Create an entry in '/media' under which the share will be visible on the Raspberry's desktop:- 4: Still on your Raspberry open this file:and add a line like this (of course a number of its entries varies from case to case, see below):or, as an alternative (when DHCP is in use):192.168.1.81 is the IP-address of the Windows-machine and may be replaced this with its networkname, in this case 'DESKTOP-K5QC49S' (of course your IP-address and/or networkname may/will be different). In particular this is of interest if you use DHCP on your Windows-machine in which case it is NOT guaranteed that the same IP-address is issued the next time you boot.
D-partition is the name of the share on the Windows-machine you want access to (see 1:)
/media/Win10 is the mountname
credentials= this entry points to the file created under '- 2:'
',_netdev' has been added to overcome a problem with the network not yet having been gotten up at boot time.
- 5: The share can now be mounted immediately (without rebooting):After a reboot the share will automatically be mounted. If not, the command 'dmesg' may provide a clue as to the reason.
I wish you all success and good luck!
Convert
To sumerise all steps up for accessing a drive on a Windows machine from a Raspberry (or most probably from any other Linux machine for that matter):
- 1: Create a share on the Windows machine. This can either be a drive or a directory on a (fixed!) drive. I called mine 'D-partition'.
For this to be accessible it MUST have a password with the account! I created an account especially for this complete with password. I gave this account the name 'Deler' with password '9725'.
Of course this step is not neccessary if your account already has a password, in which case you use your accountname and the accompanying password.
It is a good idea (read: it won't hurt) if you also note the workgroup name (which on Windows defaults to 'WORKGROUP').
I want this share to be visible on the Raspberry's desktop as 'Win10'.
- 2: On your Raspberry create a file like this:
Code:
:~ $ sudo mousepad /home/tjitte/.smbcredentials
Code:
username=Delerpassword=9725domain=WORKGROUP
Code:
]:~ $ sudo mkdir /media/Win10
Code:
:~ $ sudo mousepad /etc/fstab
Code:
//192.168.1.81/D-partition /media/Win10 cifs credentials=/home/tjitte/.smbcredentials,x-systemd.automount,iocharset=utf8,rw,uid=1000,gid=1000,_netdev
Code:
//DESKTOP-K5QC49S/D-partition /media/Win10 cifs credentials=/home/tjitte/.smbcredentials,x-systemd.automount,iocharset=utf8,rw,uid=1000,gid=1000,_netdev
D-partition is the name of the share on the Windows-machine you want access to (see 1:)
/media/Win10 is the mountname
credentials= this entry points to the file created under '- 2:'
',_netdev' has been added to overcome a problem with the network not yet having been gotten up at boot time.
- 5: The share can now be mounted immediately (without rebooting):
Code:
sudo mount -a
I wish you all success and good luck!
Convert
Statistics: Posted by Convert — Thu Feb 01, 2024 11:21 am