LinuxQuestions.org
Help answer threads with 0 replies.
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 11-14-2012, 09:42 PM   #1
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Rep: Reputation: 0
Need help mounting SAMBA network share


I am trying to mount a smb share from my NAS onto my Ubuntu 12.04 desktop. I've tried the following:

Code:
mount -t cifs //192.168.1.42/mysql_backup /media/mysql_backup
Whenever I run that it asks for a password. Once for sudo and then it just says password. I don't know what other password it wants so I enter my current user password again and I get:

Code:
mount error(13): Permission denied
I'm not sure what to do about this. I've read about specifying a username and password, but the username and password for what? The NAS share that I am trying to mount is not password protected. I can navigate to it and manipulate files on both Win and Ubuntu (via Browse Network)without ever having to enter a username or password.

So what do I need to do to get my share mounted?
 
Old 11-14-2012, 10:09 PM   #2
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
can you do it from your file browser under the network option? If you are in Ubuntu then Nautilus has the capability. Look on the pane on the left side of Nautilus click on the Network icon then it will display your shares on the network. You must know the user and password of SAMBA.

Good luck to you.
 
Old 11-14-2012, 10:15 PM   #3
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Sorry, I should've been more clear. I need to figure out the command to perform the mount so I can put it in fstab to automount on boot.

I didn't realize there was a username and password for SAMBA. How do I find out what it is?
 
Old 11-14-2012, 10:27 PM   #4
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
This link shows you the steps to set up SAMBA in Debian running in a Raspberry Pi http://elinux.org/R-Pi_NAS
For Ubuntu will be very similar. Read the steps first it will show you how to create a SAMBA user and how to set up the password.

Good luck to you.
 
Old 11-15-2012, 11:28 AM   #5
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
I am trying to mount a share from my NAS. So would I need to setup a Samba user on Ubuntu or my NAS? And if there is no user setup now, wouldn't that just mean security isn't enabled and shouldn't I be able to mount the share without any credentials?

I'm asking because I want to understand this as opposed to just knowing something will work without fully grasping why.
 
Old 11-15-2012, 01:57 PM   #6
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
After much trial and error I have it working. Here is the line I added to fstab:

Code:
//192.168.1.42/mysql_backup  /media/mysql_backup  cifs  guest,uid=1000,gid-1000  0  0
I gather that some user/pass has to be specified or you need to specify guest. The uid & gid I used are my user on Ubuntu. Without specifying that it was mounted with root user and group which kept me from being able to write to files. I don't understand why it mounted as root rather than the current user/group or even the user/group already assigned to the files and dirs on the server. This is something I still don;t understand about Linux.

One problem. When I boot Ubuntu I see a quick message about CIFS error. It's too quick to read it all. When I run grep cifs /var/log/syslog I see the following:

Code:
Nov 15 14:44:13 Ubuntu-VM kernel: [      4.170545] CIFS VFS: cifs_mount failed w/return code = -101
Nov 15 14:44:13 Ubuntu-VM kernel: [      4.419017] CIFS VFS: cifs_mount failed w/return code = -101
I haven't created any other mounts in my fstab so I can only assume those messages are related to this mount, but it seems to be working correctly. How do I figure out what those errors are related to?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mounting Samba share results in network timeout at password prompt (Slackware 12.2) sysfce2 Linux - Newbie 1 10-25-2009 05:43 AM
Mounting Windows Network Share via Samba colabus Linux - Software 11 12-08-2008 01:52 AM
Trouble mounting Samba share from Windows Mobile 6.1 - samba weirdness cleidh_mor Linux - Server 0 09-21-2008 02:43 PM
Mounting Windows Network Share via Samba colabus Linux - Newbie 6 10-12-2004 08:15 PM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 02:23 PM


All times are GMT -5. The time now is 10:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration