LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Samba - Windows - unpredictable behaviour (http://www.linuxquestions.org/questions/linux-server-73/samba-windows-unpredictable-behaviour-930382/)

velvetbulldozer 02-20-2012 03:18 PM

Samba - Windows - unpredictable behaviour
 
Hi guys,
Hope you're all doing fine.

I am continuing om my steep learning curve to create a home storage system based on Linux. I am using centos 6.2

I have created lots of shares with various users and am getting intermittent results.
I start to believe there is a bug somewhere.
This is what happens:
1. I create a new user and a password
2. I create a shared folder, a samba share, a samba password
3. The share and the folders show up in Windows 7
4. A Windows 7 logon dialog comes up and I enter the user and the samba password(the same as the user password)
5. Windows rejects my logon "wrong user or password"
6. If I enable "save my credentials" at the logon stage, Windows 7 accepts the logon and displays the files in the shared Linux folder. I can add and modify files across the systems
7. Same user and same password creates a new share and a new folder
8. Windows accepts logon even without enabling "save my credentials". It feels like Windows caches that the first time and matches the new shares and gets a match.
9. It happens roughly 30% of the time that I cannot logon even if I enable "save my credentials". I have confirmed the exact same samba settings.
10. I have tried various settings in the firewall even turned if off
11. I have used "chcon -t samba_share_t /" for the Selinux share. (all shares show as samba share in the permissions). I tried to set Selinux as permissive
12. I configure Samba with Samba Swat Browser based package. Anyone know if its unstable?

Now my questions is: Why is that I cannot logon without enabling "save my credentials" ? I don't want to save that for security reasons.
And, WHY am I not allowed to logon on at all sometimes?
Could it be a setting in Samba that I am unaware of. The Samba menu is maybe more than 100 lines...

Anyone have encounterned similar behaviour ?


Many thanks for your support,
Dan

T3RM1NVT0R 02-20-2012 03:49 PM

@ Reply
 
Hi velvetbulldozer,

Here is the link which will tell you about bit of tweaking that will require on Windows 7 part to access Linux Samba share: http://nwlinux.com/access-samba-shar...-professional/

Just follow the section:

Quote:

# ADDED FOR WINDOWS7 COMPAT.
protocol = LANMAN2
client lanman auth = yes
client ntlmv2 auth = yes
lanman auth = yes
ntlm auth = yes
and

Quote:

Control Panel > Administrative Tools > Local Security Policy (or secpol.msc)

Local Policies > Security Options

Network security: LAN Manager authentication level
Send LM & NTLM responses

Minimum session security for NTLM SSP
Disable Require 128-bit encryption
And that should be it. I did not do any registry tweaking and it worked for me.


All times are GMT -5. The time now is 09:11 AM.