[Cialug] smbpasswd
Todd E Thomas
todd_dsm at ssiresults.com
Sat Oct 29 12:42:47 CDT 2011
Depends on how samba is setup. Here's what I know:
1) I'm certain samba account info is not stored in 2 places at once. But
there are "creative" types out there; you're right to question it.
2) Samba will store account info, based on "passdb backend
<http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/passdb.html#id2587489>"
option in smb.conf:
a) smbpasswd (plaintext / obsoleted), but perhaps in use on an older
system.
Supports auth requests to the /etc/passwd and /etc/shadow-style
subsystems.
I don't have any information here as I have never used it.
b) You may be using tdbsam as an option. This will produce a
passdb.tdb (or similar, depending on distro).
You can interrogate this file with pdbedit, which is not your best
friend - it's your only friend.
To find a user: /pdbedit -Lv username/
I'm not sure if there is a way to list all users and dump a list
for analysis.
c) I use ldap so there is secrets.tdb used for authing to ldap but
then user account data is stored in the ldap database.
This should return all ldap objects with no errors
/ ldapsearch -x -H ldap://${FQDNAME} -b "${LDAPBASEDN}"
"(objectclass=*)" -D cn=config -w ${LDAPPASSWD}/
You'll have to fill in your own variables (with the quotes) but
this is the formula.
===
In the case of option "a", the file size shouldn't change as you are
modifying a password based on the same rules that have always been used;
EG: replacing a password for user1 with a password of the same size.
If you were to add users, the file size of /etc/passwd & shadow may
increase but probably only very little. Either way, check the /passdb
backend/ option to see which file you should be analyzing.
I hope this helps,
Todd E Thomas
C: 515.778.6913
"It's a frail music knits the world together."
-Robert Dana
On 10/28/2011 05:08 PM, L. V. Lammert wrote:
> Interesting question today, .. we have a older Samba server, and I was
> adding four new users today; the question:
>
> The timestamp on smbasswd changed to today [correct], however the
> *SIZE* did *NOT* change, and only about 80% of the current system
> users are IN the file!
>
> I thought Samba always kept a copy of the password in smbpassd? OR, is
> it smart enough to only add in smbpasswd if different than the system
> passwd?
>
> Lee
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cialug.org/pipermail/cialug/attachments/20111029/e9b31a68/attachment.html>
More information about the Cialug
mailing list