Samba - Win workstation, Linux Fileserver, password failure
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Samba - Win workstation, Linux Fileserver, password failure
I can't get to my Linux fileserver shares from my Windows boxes.
I've a LAN with Win98 and Win2k workstations and a Mandrake 9.0 fileserver. I've had it up and running. Due to, I think, excessive numbers of power failures, my Linux gets corrupted. My data's on one partition, root on another, so I just reinstall Linux.
Having spent a lot of time trying to get Samba configured correctly, I saved a copy of smb.conf. After I re-installed Linux, I copied the smb.conf and it seems to be working, somewhat. Windows can see the Linux box, but attempts to logon fail.
Same userids and passwords are defined on all machines. I remembered that I had to add the users and passwords to Samba, it doesn't use the Linux users. I tried the encrypt password setting in the smb.conf, it was No, also tried Yes to noavail.
I note no errors in the smb or nmb logs. But I did notice, in the nmb log, that it was the local master browser for Mandrake Group workgroup (whatever the name is, I don't remember, and later and later, further down, it said it was local master for WORKGROUP workgroup. This is not the setting in smb.conf. Could this be part of the problem, nmb is thinking it's in workgroup WORKGROUP, while the win machines are in workgroup abc.com (for example)? If so, how do I change it? Do I want a local master browser (what is it)?
Yes, I tried that for root and one user. I'd remembered that I'd needed to get smb.conf set up right and run a command, which I eventually recalled was smbpasswd.
I'd also encountered a line on a linux site, I forget the command, but it created a samba user list from the linux users, but you still had to update the users with a password.
Ok... This is one of those... What the hey happened here...
Short version:
I got it working. And it should've worked from the beginning. I did, the second time, what I did the first, mostly ;-)
What I learned:
Install Linux with Samba Server
Change the smb.conf to contain
workgroup = mydomain.com
host allow = n.n.n. (as appropriate)
encrypt password = yes
desired shares
do smbpasswd -a for each userid
restart samba (command samba restart)
It should work ;-)
(note that with older Windows that don't send encrypted passwords, I'm guessing Encrypt Passwords should be No)
Long version:
I was looking about and couldn't find the Samba configuration GUI which I'd used before (and don't particularly like as it's a bit flaky). And when I'd done my Linux install, the attempts to get the updates timed out. So I decided to use the install cd's in "upgrade mode" and keep an eye out for configuration tools. And I found some documentation packages.
I redid the copy linux users to samba users and added the passwords. I also decided that I don't need ALL the linux users, as only two of them are humans who logon, I deleted all the "system" userids from smbpasswd, leaving only the two human userids (didn't do that the first time).
I read the howto on Samba, it begins with an empty smb.conf and adds stuff to, unlike my smb.conf that was the big sample one that comes with and was tweaked as needed. I figured, what the heck, mine wasn't working anyway.
I renamed smb.conf and created a new one. The first step in the howto contained only a homes share. Didn't work, I added a workgroup = mydomain.com, which testparm showed as workgroup = WORKGROUP. Assuming some typo or syntax, I revisited that line, without changing it as it seemed correct, and after about the 5th run of testparm, it showed it as mydomain.com.
Still didn't work, but the Win98 machine was complaining about passwords and the Win2k was complaining about not being authorized to login from this location. So I'm thinking Host Allow. I added it, didn't work.
So I added Encrypt Password = yes, without much hope as I'd already tried both yes and no, along with Host Allow. It works. I can't find the difference between the old smb.conf and the new one, why one doesn't work and the other does.
This stuff drives me nuts! Ok, it's a putt, not a drive ;-)
What to put in the smb.conf was formatted to indicate what was related, and separate it from the rest, but the formatting is lost on posting. The last two, "do smbpasswd..." and "restart Samba" are not a part of "Change the smb.conf to contain"
deleting all the other users from your machine may not be the best idea because I think I have read of things that log in as "nobody" or one of the other user names that they set up as default.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.