LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-2013, 03:09 AM   #1
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Rep: Reputation: Disabled
Problem mounting SAMBA please help


I am trying to mount SAMBA/CIFS and am having problem same way am having problems with mounting NFS ( http://www.linuxquestions.org/questi...lp-4175460355/ )...i guess am just an unlucky guy


cat /etc/samba/smb.conf
Code:
[samba]
	comment = Samba
        path = /home/vm1/Desktop/samba
        writable = yes
        public = yes
findsmb
Code:
                               *=DMB
                                +=LMB
IP ADDR         NETBIOS NAME     WORKGROUP/OS/VERSION 
---------------------------------------------------------------------
192.168.1.34    VM1            [MYGROUP] [Unix] [Samba 3.6.9-151.el6]

mount -v -t cifs -o username=BUSARI,password=dadon4u //home/vm1/Desktop/samba /home/vm1/Desktop/samba-mount
Code:
mount.cifs kernel mount options: ip=67.63.55.3,unc=\\home\vm1,,ver=1,user=BUSARI,prefixpath=Desktop/samba,pass=********
and then it hangs!!!

i have to press ctrl+c to cancel it and nothing gets mounted
now i went to dmesg

dmesg | tail
Code:
ISO 9660 Extensions: Microsoft Joliet Level 3
ISO 9660 Extensions: RRIP_1991A
SELinux: initialized (dev sr0, type iso9660), uses genfs_contexts
Registering the dns_resolver key type
Slow work thread pool: Starting up
Slow work thread pool: Ready
CIFS VFS: Error connecting to socket. Aborting operation
CIFS VFS: cifs_mount failed w/return code = -512
CIFS VFS: Error connecting to socket. Aborting operation
CIFS VFS: cifs_mount failed w/return code = -113
ofcourse ports for Samba and Samba Client are both turned on in system-config-firewall

Also

service smb status
Code:
smbd (pid  2039) is running...
service nmb status
Code:
nmbd (pid  2031) is running...

What am i doing wrong here?

Last edited by nokia3310; 05-02-2013 at 03:22 AM.
 
Old 05-02-2013, 04:49 AM   #2
PierreB.
Member
 
Registered: Apr 2012
Location: Grenoble
Distribution: Rhel[456],CentOS[56],fedora18
Posts: 33

Rep: Reputation: Disabled
Hi,

Dunno it it helps but i discovered some times ago that the syntax to mount samba shares has changed (i cannot remember when or which version...) but this gives me hard times... You seem to use the syntax that causes me problems, so i show you what was the syntax i used that did not work and the new one :

Code:
## Old Bad syntax
sudo mount -t cifs -o uid=${UTILISATEUR},gid=GROUP_NAME,username=${UTILISATEUR},workgroup=WORKGROUP_NAME //windows.domain.com/smb_share /mount_point

## New working syntax
sudo mount -t cifs //windows.domain.com/smb_share /mount_point -o username=${UTILISATEUR}
Hope this helps.

Last edited by PierreB.; 05-02-2013 at 04:50 AM. Reason: Typo
 
Old 05-02-2013, 05:13 AM   #3
jitendra.sharma
Member
 
Registered: Mar 2013
Location: ahmedabad
Distribution: CentOS, Ubuntu, Debian
Posts: 92
Blog Entries: 1

Rep: Reputation: Disabled
Try this: -

@@@ CIFS(windows) share mount in linux @@@

[root@test ~]# mount -t cifs -o username=administrator,password=123 //172.16.0.25/downloads /mnt
 
Old 05-02-2013, 09:55 AM   #4
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by PierreB. View Post
Hi,

Dunno it it helps but i discovered some times ago that the syntax to mount samba shares has changed (i cannot remember when or which version...) but this gives me hard times... You seem to use the syntax that causes me problems, so i show you what was the syntax i used that did not work and the new one :

Code:
## Old Bad syntax
sudo mount -t cifs -o uid=${UTILISATEUR},gid=GROUP_NAME,username=${UTILISATEUR},workgroup=WORKGROUP_NAME //windows.domain.com/smb_share /mount_point

## New working syntax
sudo mount -t cifs //windows.domain.com/smb_share /mount_point -o username=${UTILISATEUR}
Hope this helps.
Here is what i have with the new syntax

Code:
[root@vm2 ~]# mount -t cifs //192.168.1.34:/home/vm1/Desktop/samba /home/vm1/Desktop/samba-mount -o username=BUSARI
mount error: could not resolve address for 192.168.1.34:: Unknown error


---------- Post added 05-02-13 at 09:56 AM ----------

Quote:
Originally Posted by jitendra.sharma View Post
Try this: -

@@@ CIFS(windows) share mount in linux @@@

[root@test ~]# mount -t cifs -o username=administrator,password=123 //172.16.0.25/downloads /mnt
did you see the reply above yours?
 
Old 05-03-2013, 04:28 AM   #5
PierreB.
Member
 
Registered: Apr 2012
Location: Grenoble
Distribution: Rhel[456],CentOS[56],fedora18
Posts: 33

Rep: Reputation: Disabled
Hi,

There is an error in your syntax :
Code:
//192.168.1.34:/
The error is the colon ":", i am sure you mixed some Linux syntax to UNC syntax...

Also i am quite sure you don't need to use the absolute path for the samba share, only the shared folder name is required :
e.g : For a shared folder named : exported_DIR on a server named : SERVER, you have something like :
Code:
//SERVER/exported_DIR

Try again without the colon and let's see what's happening...

Last edited by PierreB.; 05-03-2013 at 04:31 AM.
 
Old 05-03-2013, 04:45 AM   #6
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by PierreB. View Post
Hi,

There is an error in your syntax :
Code:
//192.168.1.34:/
The error is the colon ":", i am sure you mixed some Linux syntax to UNC syntax...

Also i am quite sure you don't need to use the absolute path for the samba share, only the shared folder name is required :
e.g : For a shared folder named : exported_DIR on a server named : SERVER, you have something like :
Code:
//SERVER/exported_DIR

Try again without the colon and let's see what's happening...
Yes i am now able to mount samba but another problem exists where it is not mounting after reboot even after fstab entry

see http://www.linuxquestions.org/questi...lp-4175460510/
 
Old 05-03-2013, 04:50 AM   #7
PierreB.
Member
 
Registered: Apr 2012
Location: Grenoble
Distribution: Rhel[456],CentOS[56],fedora18
Posts: 33

Rep: Reputation: Disabled
Ok, good news for your samba share, let's see what's next.

By the way, you can mark this thread as [SOLVED] and even push the answer that gave you the solution up using the " Did you find this post helpful? Yes " link at the bottom right of each answers.
 
  


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
Problem mounting subdirectories with Samba avidscavenger Linux - Networking 12 02-02-2012 11:28 PM
samba mounting problem Piro Linux - General 7 04-23-2006 08:06 PM
Samba Mounting Problem AmdMhz Linux - Networking 2 10-27-2004 03:08 PM
Weird samba mounting problem. TheRealDeal Linux - Networking 5 08-04-2004 07:44 PM
samba mounting and umounting problem urkhaa1975 Linux - Networking 0 07-30-2004 05:17 AM

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

All times are GMT -5. The time now is 10:11 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