LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba configuratin - Cannot mount samba share (https://www.linuxquestions.org/questions/linux-networking-3/samba-configuratin-cannot-mount-samba-share-877254/)

el_tedward 04-26-2011 05:03 PM

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


tobias_r33per 04-26-2011 06:43 PM

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.

el_tedward 04-26-2011 08:15 PM

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.

el_tedward 05-01-2011 03:06 PM

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.

el_tedward 05-02-2011 09:04 PM

Works from windows :D 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 #



All times are GMT -5. The time now is 02:53 AM.