Re: [SLUG] SMB User Passwords Not working

From: Backward Thinker (backwardthinker@juno.com)
Date: Tue Aug 31 2004 - 13:42:04 EDT


> > First off, does the guest account "samba" exist on your system?
> Do I need to have a user samba? or simply a directory for it?

Yes, it needs to be a real user. Typically people just use the
"nobody" account for the guest account, but any valid system
account is okay, like ftp or apache or www or whatever is
appropriate for your environment. nobody is probably a good one,
but you can create one just for samba if you prefer. You are
running in security = share mode, which means that all connections
are initially anonymous and unauthenticated. The smbd handling
your connection changes its uid to that of the guest account. It
sounds like that guest account doesn't exist, which is a big
problem.

> > what's in your pam file for samba?
> #%PAM-1.0
> # pam_smbpass.so authenticates against the smbpasswd file
> auth required pam_smbpass.so nodelay
> account required /lib/security/pam_stack.so service=system-auth
> session required /lib/security/pam_stack.so service=system-auth
> password required pam_smbpass.so nodelay smbconf=/etc/samba/smb.conf

Okay, so it'll be pulling the password out of smbpasswd.

> > If there are pam_smbpasswd.so lines...
> > Is there anything in your /etc/samba/smbpasswd file, like:
> > root:0:lanman hash:nt hash:[flags]:lastchanged
> Yes

> > When was the file last updated? If you run smbpasswd to change
> > the root password, does the file get modified?
> Original date was 8-29-04 I changed it again by running smbpasswd -a
> root and put in a totally new password that is shorter than the
> original and the date did change to 8-31-04 but the file size did not
> which seemed odd to me.

That's normal. smbpasswd stores hashes; the size of the password
hash does not vary with size of the password. Important thing is,
everything seems to be pointing to the correct files.

> > Otherwise, it's probably using your system root password. Is that
> > what you've been trying?
> I have tired it as well as other, currently from the notes above it
> is different.

Yeah, from your samba pam configuration above, it's clear samba
will only authenticate against passwords in the smbpasswd file.
That password can be totally different from your real root
password.

> > Have you run smbclient with increased debugging (-d 4 for example)
> >
> > What happens when you do:
> > smbclient //127.0.0.1/HPDeskJet -U root -d 4
> Same result but it seems to be connecting to the printer.

I'd change the guest account to a valid account name (or add a
samba account to the system), and try again. Which version of
samba is this, a 3.0.x or 2.2.x? It's acting like a 3.0.x...
a 2.2.x probably would have actually allowed the listing to take
place without a proper guest account as long as the root password
was okay. This not working in 3.0.x is actually more correct. I'm
sure that's a great consolation for you... ha ;).

And if you haven't yet, change your:
socket options = TCP_NODELEAY SO_RCVBUF=8192 SO_SNDBUF=8192
to
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
:)

FYI, security = user is very much preferred over security = share.
Some people refer to security = share as security = none... but
if your firewall is up and properly configured then hopefully you
won't have problems with prying eyes. I see you've got your hosts
allow and hosts deny set up, so that's good.

Hope the guest account fixes it for you,
~ Daniel

________________________________________________________________
The best thing to hit the Internet in years - Juno SpeedBand!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:53:32 EDT