LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-26-2011, 06:03 PM   #1
el_tedward
LQ Newbie
 
Registered: Apr 2010
Posts: 17

Rep: Reputation: 0
Samba configuratin - Cannot mount samba share


Seems like I have this problem every time I try to set up a samba server. Anyways, here's my configuration

Centos 5.6 x64, Windows 7 Professional x64

Start>Run>\\192.168.0.1\storage gives me "The specified network password is not correct." It lists my domain as "ANTEC" which is the name of my computer, though I've changed the workgroup to WELLS.

I've run:
setsebool -P samba_domain_controller on

Trying to connect to samba locally gives me this:
Code:
[tedward@hp-firegate ~]$ smbclient //192.168.0.1/storage -Utedafur
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
/etc/samba/smb.conf:
Code:
[global]
security = user
workgroup = WELLS
server string = Wells Storage
smb passwd file = /etc/smbpasswd
encrypt passwords = true
log file = /var/log/samba/log.%m
socket options = IPTOS_LOWDELAY TCP_NODELAY
domain master = Yes
local master = Yes
preferred master = Yes
os level = 65
dns proxy = no
name resolve order = lmhosts host bcast
interfaces = eth0 lo
hosts deny = 0.0.0.0/0
hosts allow = 192.168.0.0/24 127.0.0.1
debug level = 1
create mask = 0644
directory mask = 0755
level2 oplocks = True
read raw = no
guest ok = no
client lanman auth = no
client ntlmv2 auth = yes
server signing = mandatory
client signing = mandatory

[storage]
comment = Wells Storage
path = /storage
read only = no
write list = tedafur wells
valid users = tedafur wells
invalid users = root @wheel
guest ok = no

testparm:
Code:
[tedward@hp-firegate ~]$ testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section "[storage]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = WELLS
        server string = Wells Storage
        interfaces = eth0, lo
        smb passwd file = /etc/smbpasswd
        client NTLMv2 auth = Yes
        client lanman auth = No
        client plaintext auth = No
        log level = 1
        log file = /var/log/samba/log.%m
        read raw = No
        name resolve order = lmhosts host bcast
        client signing = required
        server signing = required
        socket options = IPTOS_LOWDELAY TCP_NODELAY
        os level = 65
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        create mask = 0644
        hosts allow = 192.168.0.0/24, 127.0.0.1
        hosts deny = 0.0.0.0/0

[storage]
        comment = Wells Storage
        path = /storage
        invalid users = root, @wheel
        valid users = tedafur, wells
        write list = tedafur, wells
        read only = No
 
Old 04-26-2011, 07:43 PM   #2
tobias_r33per
Member
 
Registered: Aug 2003
Location: Sydney
Distribution: Fedora Core 14, Gentoo 2011, Mandriva 2010 Powerpack, Ubuntu 10.10
Posts: 49

Rep: Reputation: 17
Quote:
domain master = Yes
workgroup = WELLS
These settings can conflict with each other, my suggestion would be to use one or the other for testing, but i think you are missing some more settings in order to get the proper authentication to work.

Check the settings based under:

http://www.samba.org/samba/docs/man/...kBrowsing.html

Under the "Domain Browsing Configuration" section. as you may need to add additional perimeters for the domain user browsing.
 
Old 04-26-2011, 09:15 PM   #3
el_tedward
LQ Newbie
 
Registered: Apr 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Really not sure what parameters I should add from that page. I've tried commenting out the two lines you mentioned individually, and still get the same error.
 
Old 05-01-2011, 04:06 PM   #4
el_tedward
LQ Newbie
 
Registered: Apr 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Okay, looks like this was mostly an SELINUX problem. I made the following SELINUX changes:

setsebool -P samba_export_all_rw on
chcon -t samba_share_t /storage/samba/

I'm not sure if the chcon at the end was necessary. It was only after the setsebool that I was able to get it to work, at least from my linux client.

Also, I had to comment out the line "smb passwd file = /etc/smbpasswd." Why that is still has me confused.

Current smb.conf file is:

Code:
  1 # Samba config, GAAAHAHAHAH
  2 
  3 [global]
  4 
  5 workgroup = WELLS
  6 #netbios name = firegate
  7 security = user
  8 #smb passwd file = /etc/smbpasswd
  9 encrypt passwords = true
 10 
 11 [storage]
 12 
 13 path = /storage/samba
 14 comment = Wells Storage
 15 guest ok = no
 16 
 17 
 18 ## SELINUX Changes that were made before this worked ###
 19 # chcon -t samba_share_t /storage/samba
 20 # setsebool -P samba_export_all_rw on
 21 #
 22 #
 23 #
Heading out right now. When I get back home, will test things out on my windows client to see if it works there.

Last edited by el_tedward; 05-01-2011 at 04:07 PM.
 
Old 05-02-2011, 10:04 PM   #5
el_tedward
LQ Newbie
 
Registered: Apr 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Works from windows Here is my current smb.conf, which works just as the last one I posted does:

Code:
  1 # Samba config, GAAAHAHAHAH
  2 
  3 [global]
  4 
  5 workgroup = WELLS
  6 #netbios name = firegate
  7 security = user
  8 #smb passwd file = /etc/smbpasswd
  9 encrypt passwords = true
 10 
 11 client lanman auth = no
 12 client ntlmv2 auth = yes
 13 server signing = mandatory
 14 client signing = mandatory
 15 hosts deny = 0.0.0.0/0
 16 hosts allow = 192.168.0.0/24 127.0.0.1
 17 
 18 [storage]
 19 
 20 path = /storage/samba
 21 comment = Wells Storage
 22 guest ok = no
 23 create mask = 775
 24 directory mask = 775
 25 write list = wells
 26 valid users = wells
 27 invalid users = root @wheel
 28 
 29 
 30 ## SELINUX Changes that were made before this worked ###
 31 # chcon -t samba_share_t /storage/samba
 32 # setsebool -P samba_export_all_rw on
 33 #
 34 #
 35 #
 
  


Reply

Tags
file sharing, samba, smbclient, smbconf


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
Can't mount Samba share stalemath Linux - Server 1 02-02-2011 09:04 AM
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 02:35 AM
mount windows share export to samba share -> improve network performance tuning newuser77 Linux - Server 1 07-23-2008 12:28 PM
Samba share will not mount CloudBuilder Ubuntu 15 09-26-2007 05:15 PM
show the samba share but can't mount the share badall Linux - Server 3 05-30-2007 05:24 AM


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