LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-02-2019, 11:47 PM   #1
Hchinasky
LQ Newbie
 
Registered: May 2019
Posts: 3

Rep: Reputation: Disabled
Can't find in /etc/fstab error, unable to mount the drive.


Hello! First posting on LinuxQuestions.
Im using ubuntu 10.04.2-desktop-amd64 on my virtual machine. I created a directory called ~/SambaMount and when i try to mount the drive i get this /etc/fstab error. Here is the command I typed.
$sudo mount -t cifs -o username=alex,uid=100,gid=1000 //server1/SambaMount
 
Old 05-03-2019, 12:14 AM   #2
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by Hchinasky View Post
$sudo mount -t cifs -o username=alex,uid=100,gid=1000 //server1/SambaMount
You're missing the directory to mount it on.
So then mount will try to find that directory in the /etc/fstab file and when no entry for that shared drive is present there you get an error.
Either specify the directory (which MUST already exist) or create a line for it in the /etc/fstab (which will also save you the trouble of specifying the options).
 
2 members found this post helpful.
Old 05-03-2019, 01:10 AM   #3
Hchinasky
LQ Newbie
 
Registered: May 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
The first issue cleared up with the corrected command. Now I'm getting an error that says couldn't chdir to SambaMount no such file or directory. I created a directory called SambaMount prior to attempting the command.
Corrected command
username=alex,uid=1000,gid=1000 //server1/SharedWindows /SambaMount
 
Old 05-03-2019, 08:02 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
It's been a while since I windows or samba'd, but shouldn't that be \\ not // ?
AKA \\server1\SambaMount

It's the reason I favor keyboards with the \ + | key above the enter key. Even though I haven't coded for windows in more than a decade.

It might not matter, but did you chown the /SambaMount before mounting?

$ sudo chown alex:alex /SambaMount

Otherwise you might be limited to chdir of subdirectories under /SambaMount. Not that I fiddle in that land much. Also if you're not concerned with security, or shooting your own foot off, you could use umask=#### where #### is the permissions you don't want. With 0222 being no write access, and 0000 being universal access to anyone and all things relative to the mount point. Perhaps only useful for shortening your mount command at a risk.

$ sudo mount -t cifs -o umask=0000 \\server1\SambaMount /SambaMount

Perhaps samba in linux is as / \ insensitive as windows is case insensitive. Never really dwell-ed there much since I don't do windows and NFS or just nc files between computers depending on the lazy attributes of any given day.
 
1 members found this post helpful.
Old 05-03-2019, 10:20 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Shadow_7 View Post
It's been a while since I windows or samba'd, but shouldn't that be \\ not // ?
Forward slashes are fine.
 
Old 05-03-2019, 10:22 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Hchinasky View Post
The first issue cleared up with the corrected command. Now I'm getting an error that says couldn't chdir to SambaMount no such file or directory. I created a directory called SambaMount prior to attempting the command.
Corrected command
username=alex,uid=1000,gid=1000 //server1/SharedWindows /SambaMount
So you ran these commands:
Code:
mount -o username=alex,uid=1000,gid=1000 //server1/SharedWindows /SambaMount
cd /SambaMount
The first command succeeded, and the second one failed with the error message. Correct?
If so, this is very strange, and I wonder if you omitted the slash when trying to change to the /SambaMount directory.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
\vi/etc/fstab works fine . vi /etc/fstab throws bash command not found in Rescue mode jsaravana87 Linux - Server 1 05-13-2013 02:08 PM
server startup error: "cannot find / in /etc/fstab or /etc/mtab"; /etc/fstab readonly knee-co Linux - Newbie 8 09-12-2010 05:37 PM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
mount: can't find /dev/hda1 in /etc/fstab or /etc/mtab timalan SUSE / openSUSE 24 08-20-2005 09:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration