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

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Matt26

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

Post 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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: need help with remote NTFS volume mount in fstab

Post 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
Matt26

Re: need help with remote NTFS volume mount in fstab

Post by Matt26 »

thanks, i found out what the issue was- i didn't have smbfs installed.. worked fine after that was installed...
Locked

Return to “Beginner Questions”