Page 1 of 1

<SOLVED> need help with remote NTFS volume mount in fstab

Posted: Sat Jul 11, 2009 4:26 pm
by Matt26
i have an entry in my fstab file that mounts an NTFS volume on a remote windows xp system, and i think i'm running into an issue with using the smbcredentials file.. if i have the credentials included in the fstab entry like below, then the volume mounts fine:

Code: Select all

//server/share /home/mount cifs username=user,password=pwd 0 0
but when i try including the smbcredential file like below:

Code: Select all

//server/share /home/mount cifs credentials=/home/username/.smbcredentials 0 0
i get this error message when i try to execute sudo mount -a from the terminal:

mount: wrong fs type, bad option, bad superblock on //server/share,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so

i have checked the smbcredentials file and it has the correct username and password.

can anyone tell me what i might be doing wrong here?

thanks.

Re: need help with remote NTFS volume mount in fstab

Posted: Sat Jul 11, 2009 8:12 pm
by DrHu
https://techcommons.stanford.edu/topics ... untu-linux

https://wiki.ubuntu.com/MountWindowsSharesPermanently
However, the /etc/fstab is readable by everyone so it obviously wouldn't be a good idea to have your Windows password in it. The way to get around this is by using what is known as a credentials file.[/]
This is a file that contains just the username and password.
sudo gedit ~/.smbcredentials
Add the following lines:
username=myusername
password=mypassword
and save it.

Modify the permissions on the file so only you have permission to read and write to it. The only thing in the file is your Windows username and password.
sudo chmod 600 ~/.smbcredentials


And...
https://wiki.ubuntu.com/MountWindowsSharesPermanently
Use of "credentials=~/.smbcredentials"
20 Feb 2008 TW
Curiously using credentials=~/.smbcredentials in fstab would only work if used the full path, i.e. /home/username/.smbcredentials

Re: need help with remote NTFS volume mount in fstab

Posted: Sat Jul 11, 2009 10:12 pm
by Matt26
thanks, i found out what the issue was- i didn't have smbfs installed.. worked fine after that was installed...