Discussion:
[Samba] samba-3.0.23d, smbpasswd, and "NO PASSWORD" behaviour
(too old to reply)
Todd Pfaff
2007-02-22 21:10:07 UTC
Permalink
We've recently started using samba-3.0.23d on Mandriva 2007.0 linux
systems and we've noticed a change in behaviour of smbpasswd when a
non-root user tries to change their password from "NO PASSWORD".

Here's an example smbpasswd entry (all one line):

testuser:12345:NO PASSWORDXXXXXXXXXXXXXXXXXXXXX:
NO PASSWORDXXXXXXXXXXXXXXXXXXXXX:[NU ]:LCT-00000000:


The possibly related settings in our smb.conf are:

encrypt passwords = yes
security = user
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *password:* %n\n *password* %n\n *successfully*
null passwords = no


Since "null passwords = no" a user with "NO PASSWORD" should not be able
to login to the samba account. That's working as expected.

In past versions of samba, testuser could login to the linux account, run
smbpasswd, enter an empty old password, and set a new password.

Now when we try this we get this failure:

[***@localhost ~]$ smbpasswd
Old SMB password:
New SMB password:
Retype new SMB password:
Could not connect to machine 127.0.0.1: NT_STATUS_LOGON_FAILURE
Failed to change password for testuser


Does anyone know why this failure is happening now?

Was the behaviour of smbpasswd changed intentionally?
If so, in what samba version did this change happen?

Is there an alternative way to achieve the smbpasswd
behaviour that we had in the past?


Thanks,
--
Todd Pfaff <***@mcmaster.ca>
Research & High-Performance Computing Support
McMaster University, Hamilton, Ontario, Canada
http://www.rhpcs.mcmaster.ca/~pfaff
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
Todd Pfaff
2007-02-26 18:20:08 UTC
Permalink
I've had no responses to this question yet, and I'm still stuck with this
problem. Can anybody help, please?

Is this a capability of samba that not many people take advantage of?

Or am I trying to do something that just isn't possible anymore?

Picking through a the level 10 debug log of smbd, I see this:

[2007/02/26 11:49:36, 3] auth/auth_sam.c:sam_password_ok(51)
Account for user 'testuser' has no password and null passwords are NOT
allowed.
[2007/02/26 11:49:36, 9]
passdb/passdb.c:pdb_update_bad_password_count(1373)
No bad password attempts.
[2007/02/26 11:49:36, 5] auth/auth.c:check_ntlm_password(273)
check_ntlm_password: sam authentication for user [testuser] FAILED with
error NT_STATUS_LOGON_FAILURE


Is it no longer possible for a user to change their own samba password
from null "NO PASSWORD" using the smbpasswd command?

--
Todd Pfaff <***@mcmaster.ca>
Research & High-Performance Computing Support
McMaster University, Hamilton, Ontario, Canada
http://www.rhpcs.mcmaster.ca/~pfaff
We've recently started using samba-3.0.23d on Mandriva 2007.0 linux systems
and we've noticed a change in behaviour of smbpasswd when a non-root user
tries to change their password from "NO PASSWORD".
encrypt passwords = yes
security = user
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *password:* %n\n *password* %n\n *successfully*
null passwords = no
Since "null passwords = no" a user with "NO PASSWORD" should not be able to
login to the samba account. That's working as expected.
In past versions of samba, testuser could login to the linux account, run
smbpasswd, enter an empty old password, and set a new password.
Could not connect to machine 127.0.0.1: NT_STATUS_LOGON_FAILURE
Failed to change password for testuser
Does anyone know why this failure is happening now?
Was the behaviour of smbpasswd changed intentionally?
If so, in what samba version did this change happen?
Is there an alternative way to achieve the smbpasswd
behaviour that we had in the past?
Thanks,
--
Research & High-Performance Computing Support
McMaster University, Hamilton, Ontario, Canada
http://www.rhpcs.mcmaster.ca/~pfaff
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
Gary Dale
2007-02-26 20:30:19 UTC
Permalink
The obvious question is, why would you want a null password to begin
with? This seems to me to be a serious security problem.

If it's for new users, give them a temporary password through a secure
channel and require them to change it the first time they log on.
Post by Todd Pfaff
I've had no responses to this question yet, and I'm still stuck with
this problem. Can anybody help, please?
Is this a capability of samba that not many people take advantage of?
Or am I trying to do something that just isn't possible anymore?
[2007/02/26 11:49:36, 3] auth/auth_sam.c:sam_password_ok(51)
Account for user 'testuser' has no password and null passwords are NOT
allowed.
[2007/02/26 11:49:36, 9]
passdb/passdb.c:pdb_update_bad_password_count(1373)
No bad password attempts.
[2007/02/26 11:49:36, 5] auth/auth.c:check_ntlm_password(273)
check_ntlm_password: sam authentication for user [testuser] FAILED with
error NT_STATUS_LOGON_FAILURE
Is it no longer possible for a user to change their own samba password
from null "NO PASSWORD" using the smbpasswd command?
--
Research & High-Performance Computing Support
McMaster University, Hamilton, Ontario, Canada
http://www.rhpcs.mcmaster.ca/~pfaff
Post by Todd Pfaff
We've recently started using samba-3.0.23d on Mandriva 2007.0 linux
systems and we've noticed a change in behaviour of smbpasswd when a
non-root user tries to change their password from "NO PASSWORD".
encrypt passwords = yes
security = user
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *password:* %n\n *password* %n\n *successfully*
null passwords = no
Since "null passwords = no" a user with "NO PASSWORD" should not be
able to login to the samba account. That's working as expected.
In past versions of samba, testuser could login to the linux account,
run smbpasswd, enter an empty old password, and set a new password.
Could not connect to machine 127.0.0.1: NT_STATUS_LOGON_FAILURE
Failed to change password for testuser
Does anyone know why this failure is happening now?
Was the behaviour of smbpasswd changed intentionally?
If so, in what samba version did this change happen?
Is there an alternative way to achieve the smbpasswd
behaviour that we had in the past?
Thanks,
--
Research & High-Performance Computing Support
McMaster University, Hamilton, Ontario, Canada
http://www.rhpcs.mcmaster.ca/~pfaff
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
Todd Pfaff
2007-02-26 21:10:12 UTC
Permalink
The way it's documented to work in the smbpasswd man page, and the way it
used to work for us with older samba releases is: when a user has a null
password, and smb.conf "null passwords = no", the user can _not_ make
an smb connection, but they _can_ set their samba password to something
non-null by running smbpasswd and entering an empty old password.
In order to run smbpasswd the user must login to their linux account with
ssh, and that _does_ require a password.

So in fact this may be considered even more secure than what you're
suggesting because a new user has no ability to make smb connections to
the server until they have logged in to their linux account with a
password and run smbpasswd to set a samba password.

I realize that I could set an initial smb password for every user, but
there are situations where that is inconvenient, and since this null
password method did work perfectly well in the past without being a
significant security risk, it's now inconvenient that it no longer works
as it did in the past.

I'm trying to determine why the behaviour changed, or if it really didn't
change but I'm now doing something incorrectly on my samba server.
And if it really did change then someone should fix the smbpasswd man
page accordingly, and maybe mention something in the release notes.

Regards,
Todd
The obvious question is, why would you want a null password to begin with?
This seems to me to be a serious security problem.
If it's for new users, give them a temporary password through a secure
channel and require them to change it the first time they log on.
Post by Todd Pfaff
I've had no responses to this question yet, and I'm still stuck with this
problem. Can anybody help, please?
Is this a capability of samba that not many people take advantage of?
Or am I trying to do something that just isn't possible anymore?
[2007/02/26 11:49:36, 3] auth/auth_sam.c:sam_password_ok(51)
Account for user 'testuser' has no password and null passwords are NOT
allowed.
[2007/02/26 11:49:36, 9]
passdb/passdb.c:pdb_update_bad_password_count(1373)
No bad password attempts.
[2007/02/26 11:49:36, 5] auth/auth.c:check_ntlm_password(273)
check_ntlm_password: sam authentication for user [testuser] FAILED with
error NT_STATUS_LOGON_FAILURE
Is it no longer possible for a user to change their own samba password from
null "NO PASSWORD" using the smbpasswd command?
--
Research & High-Performance Computing Support
McMaster University, Hamilton, Ontario, Canada
http://www.rhpcs.mcmaster.ca/~pfaff
Post by Todd Pfaff
We've recently started using samba-3.0.23d on Mandriva 2007.0 linux
systems and we've noticed a change in behaviour of smbpasswd when a
non-root user tries to change their password from "NO PASSWORD".
encrypt passwords = yes
security = user
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *password:* %n\n *password* %n\n *successfully*
null passwords = no
Since "null passwords = no" a user with "NO PASSWORD" should not be able
to login to the samba account. That's working as expected.
In past versions of samba, testuser could login to the linux account, run
smbpasswd, enter an empty old password, and set a new password.
Could not connect to machine 127.0.0.1: NT_STATUS_LOGON_FAILURE
Failed to change password for testuser
Does anyone know why this failure is happening now?
Was the behaviour of smbpasswd changed intentionally?
If so, in what samba version did this change happen?
Is there an alternative way to achieve the smbpasswd
behaviour that we had in the past?
Thanks,
--
Research & High-Performance Computing Support
McMaster University, Hamilton, Ontario, Canada
http://www.rhpcs.mcmaster.ca/~pfaff
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
Loading...