nyathancha@hotmail.com wrote:
> Hi,
> I have vista box and a linux box running Ubuntu 7.04. I am trying to
> set up a share between the two that doesn't require special accounts
> on the boxes (so my flatmates running XP would be able to access
> either of the machines easily).
>
> Currently with samba running on the linux box, both machines can see
> each other, but everytime i try to access the vista machine it asks me
> for a user name and password. I went into the Network and Sharing
> center in the control panel and turned off "Password Protected
> Sharing" option. But it still asks me for a username and password
> (once, i provide them it works fine)
>
> Going from vista to linux seems trickier. The linux box asks me for a
> username and password as well, but even after I enter them, it says
> "invalid username".
>
> What am I doing wrong here? Any help would be much appreciated.
>
> Thanks in advance
>
It sounds like you forgot to create user accounts/passwords on the Linux
box to match the ones on the Windows boxen *and* you forget to add the
users/passwords to Samba. It is a two-step process. I don't know what
you mean by "special accounts". You have to have identical user accounts
in both places. There's nothing preventing you from making a "Visitors"
account on all of the computers. In addition, note that Guest access is
off by default in Samba (as it should be). Here is how to share files
between Windows and Linux using Samba and the additional information you
need if there is a Vista box involved.
A. General Samba/Windows information
1. On Windows boxen, make sure all accounts are properly named (no
damned spaces) and there are no null passwords. Configure any firewalls
to allow lan traffic. Create shares as desired. Note that if any boxen
are XP Pro, you should disable Simple Sharing (Folder Options>View).
2. On Linux, create identical user account/passwords with your distro's
configuration method.
3. Make sure you've installed Samba server/client with your distro's
configuration method.
4. Configure run levels so that the nmb and smb daemons start at bootup.
5. Now add your users to Samba. Make these match the ones on Windows. I
think the easiest way is from the console, so open one, su to root, and
type:
smbpasswd -a username [enter]
(enter password)
(enter password again)
6. Go to your distro's configuration method and set your Samba server
and client Identity to match your Windows Workgroup name.
7. I use KDE, so if you use Gnome or another window manager you'll need
to figure this next bit out yourself. Open up the Control Center and go
to Internet/Network and then Samba. Click on the Administrator Mode
(enter root password). I use User security level. Check to make sure
Shares (these are for the Linux box of course) are the way you want
them. Apply and close that part.
8. Click on File Sharing and enable Administrator Mode. Check "Enable
local network file sharing". I have mine set on "Advanced sharing".
Check the box for "Use Samba" rather than NFS.
And that's pretty much it. Now if you want to make a new share - say a
folder that isn't in your /home, you can right-click it to set Sharing
Properties. If all you want to share is your /home, you're done. Since
9.3, SUSE has a useful Network icon on the desktop (at least in KDE it
does) where you can find your Windows Workgroup and see all the smb
shares. Perhaps your distro does, too.
Note: To use a Linux firewall w/Samba - If you do not have WINS on the
network, then your network is relying on broadcasted browser
announcements for NetBios resolution. Configure your firewall to allow
NetBios broadcasts, with UDP and TCP ports 137-139 open.
This site has an excellent firewall how-to -
http://www.tweakhound.com/linux/samba/page_5.htm
B. Extra information for Vista/Linux sharing:
From Michael Bishop (MS) - Basically, the issue with Samba and Vista is
that Vista no longer permits LM or NTLM authentication by default only
NTLMv2. Samba versions 1.x and 2.x only support LM and NTLM, so there's
an issue there.
Recommended solution: upgrade to Samba 3.x and enable NTLMv2 by adding
"client ntlmv2 auth = yes" to your smb.conf file. Because of another
issues with previous versions, I strongly recommend upgrading to 3.0.22
or later regardless of your choice for this particular instance.
Alternate solution: change Vista's security settings to permit
lower-security authentications. (as below)
To enable Windows Vista to connect to Mac OS X with Windows File Sharing
enabled, you will need to change the following policy in Windows Vista:
Start>Run>secpol.msc [enter]
Click on "Local Policies" --> "Security Options"
Navigate to the policy "Network Security: LAN Manager authentication
level" and double-click it to get its Properties. By default Windows
Vista sets the policy to "NTVLM2 responses only". Use the drop-down
arrow to change this to "LM and NTLM – use NTLMV2 session security if
negotiated".
In Vista Home Premium, you won't have this tool so per Steve Winograd, do:
1. Run the registry editor and open this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
1. If it doesn't already exist, create a DWORD value named
LmCompatibilityLevel
3. Set the value to 1
4. Reboot
Malke
--
Elephant Boy Computers
www.elephantboycomputers.com
"Don't Panic!"
MS-MVP Windows - Shell/User