1

related to thread How to edit /etc/fstab properly for network drive?

i have added the following line to /etc/fstab

//192.168.0.52/public /mnt/PC52/public cifs username=guest,password="" 0 0

if i call sudo mount -a the directory mounts and all works fine, but if i reboot the computer it fails to add at boot, i feel like its something to do with the blank password that i have passed, if i omit the password field completely it prompts for a password during boot and if i just press enter it boots and works

Jay Dee
  • 121
  • 5

1 Answers1

1

sorted it.

as its an open directory it doesn't matter what password i send, as long as i add the password field setting the password to something it works.

changing the line in fstab to the following, it works fine

//192.168.0.52/public /mnt/PC52/public cifs username=guest,password=123 0 0

Jay Dee
  • 121
  • 5
  • Since `/etc/fstab` has `644` permissions, I would recommend using a keyring to store the credentials, or save the file as root to `/root/.cifs` and `chmod 600` it. – cutrightjm Sep 23 '20 at 15:11
  • if it was an actual password i would agree but as it is a guest account i did not think it mattered – Jay Dee Sep 23 '20 at 15:14
  • Makes sense, I thought you were just using guest as a placeholder – cutrightjm Sep 23 '20 at 15:23
  • 2
    That's a great way to prevent your system from booting when your smb machine is down. – SKull Sep 23 '20 at 16:36
  • Mayhew, do you care to elaborate on your apparat better approach or are you just trying to throw in downers on people trying to achieve anything, in all honesty i just want to be able to access the share point whenever it is available to be accessed. – Jay Dee Sep 24 '20 at 10:04
  • Mayhew, i have shut the server down and booted up my computer, the computer boots up just fine as expected, the mount point failed to mount since it is not there, i don't see what the problem is. – Jay Dee Sep 24 '20 at 10:13