LinuxQuestions.org
Review your favorite Linux distribution.
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 04-12-2015, 12:40 PM   #1
linuxmantra
Member
 
Registered: Dec 2013
Posts: 110

Rep: Reputation: Disabled
Samba Mount Headache


I banging my head, I am unable to mount samba share. Here is the info
Samba share is in RHEL 6.5
# vi /etc/samba/smb.conf
[sambashare]
comment = samba share
path = /smbdemo
guest ok = yes
browseable = yes

# ls -dZ /smbdemo/
drwxrwxrwx. root root system_ubject_r:samba_share_t:s0 /smbdemo/

# getsebool -a | grep samba
samba_create_home_dirs --> on
samba_domain_controller --> off
samba_enable_home_dirs --> on
samba_export_all_ro --> on
samba_export_all_rw --> on
samba_portmapper --> off
samba_run_unconfined --> off
samba_share_fusefs --> off
samba_share_nfs --> off
sanlock_use_samba --> off
use_samba_home_dirs --> off
virt_use_samba --> off


Accessing this share from another Red Hat Box 6.4 (samba-client)
# smbclient -L 192.168.1.10 -U don [Works perfectly]

Now, when I try to mount the share as:

# mount.cifs //192.168.1.9/smbdemo /opt/test/ -o user=don
Password:
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

# smbclient //192.168.1.9/smbdemo -U don
Enter don's password:
Domain=[BARNES] OS=[Unix] Server=[Samba 3.6.23-14.el6_6]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

I searched in google but no avail.

Last edited by linuxmantra; 04-12-2015 at 01:00 PM.
 
Old 04-12-2015, 01:11 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Shouldn't you be trying mounting with this name: sambashare because that is the name that you have given to the share. So the command should look like:

Code:
mount.cifs //192.168.1.9/smbdemo /opt/test/ -o user=don
smbdemo is the path not the share name and that is the reason you get
Code:
mount error(6): No such device or address
 
Old 04-12-2015, 01:27 PM   #3
linuxmantra
Member
 
Registered: Dec 2013
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Shouldn't you be trying mounting with this name: sambashare because that is the name that you have given to the share. So the command should look like:

Code:
mount.cifs //192.168.1.9/smbdemo /opt/test/ -o user=don
smbdemo is the path not the share name and that is the reason you get
Code:
mount error(6): No such device or address
Thanks Terminator. But after analyzing I and trying I resolved the issue and you are right too. What I did was, I changed the share name same as the shared folder and it resolved the issued.

# vi /etc/samba/smb.conf
[smbdemo]
comment = samba share
path = /smbdemo
guest ok = yes
browseable = yes

# mount.cifs //192.168.1.9/smbdemo /opt/test/ -o user=don,password=don

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_client02-lv_root
13G 2.4G 10G 19% /
tmpfs 344M 0 344M 0% /dev/shm
/dev/sda1 485M 33M 427M 8% /boot
//192.168.1.9/smbdemo
13G 2.4G 9.9G 20% /opt/test


..GREAT...It was a PAIN in @$$ ... ISSUE RESOLVED...
 
Old 04-12-2015, 01:31 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
You're welcome. Yes if you changed the share name to smbdemo then it will work with the command you mentioned and I forgot to change the name of share in the command

The command should look as follows with the old setup you mentioned:
Code:
mount.cifs //192.168.1.9/sambashare /opt/test/ -o user=don
Please mark the thread as solved.

Enjoy Linux!!!
 
  


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
Mount blues and a headache at times on a nas ajohn Linux - Newbie 2 06-03-2011 05:18 AM
Samba Headache jbstew32 Linux - Networking 0 12-23-2003 07:16 PM
Samba Headache! scorpatron Linux - Networking 4 11-10-2003 05:36 AM
CUPS, Samba, and a whole lotta headache jspaceman Linux - Networking 2 10-13-2003 11:13 PM
samba giving me a headache DAChristen29 Linux - Networking 14 07-03-2003 12:34 PM


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