
This will be most easily accomplished by mounting the SD card on another computer (Mac/Linux/Windows) and editing the cmdline.txt file there. You need to remount this with read write permissions: The second device mmcblk0p2 will be your root partition. You can do this by going to the /dev directory and you should see something similar to mmcblk0p1 & mmcblk0p2. If you get that move to the next step.Ī Raspberry Pi SD card will have two main partitions, since we cannot read the partition table directly you must manually locate the device for your root and boot partitions. In some cases you will not be able save your changes and the system will complain of a read only file system.From here you can undo the changes to /etc/fstab or whatever else that initially broke your system. You should now get the a root shell prompt.

SAMBA SHARE RASPBERRY PI MAC
Retrieve your SD card from the Pi and using a adapter mount the card to your PC, Mac or Linux.Summary of the linked steps for the future: If, after trying to auto-mount a share, you somehow run into the scenario where the Pi will no longer boot, drops you in "Emergency Mode" and/or tells you that the root account is locked, you can overcome it by following the instructions located here: Raspberry Pi Boot Issue - Root account locked!. Then edit as root the fstab to add your samba share //server/share /mnt/abc cifs credentials=/home/pi/.smbcredentials 0 0Īnd if there are no errors then it will mount the share automatically when you reboot. Save the file and change its permissions so it is not readable by others.
SAMBA SHARE RASPBERRY PI PASSWORD
Then enter your username and password into the file username=username Its not the best idea to use this method if others have access to your RPi or network as fstab is readable by all and will be able to read your password.Ī better solution is to use a credentials file. server/share /mnt/abc cifs username=username,password=password 0 0

If your samba share needs a password then you you can connect use the following in your fstab entry. If the samba share does not need any credentials to login and you want to mount the share when you start your raspberry pi then edit the fstab file as root sudo nano /etc/fstabĪnd add the following line //server/share /mnt/abc cifs guest 0 0Ĭlose and save the changes to the fstab fileĬheck that everything connects as it should with sudo mount -a
