HOME
PROJECTS
SETIATHOME
BOFH
XBLAST
LINKS
MIRRORS
____________

Patch to samba-2.0.7 to avoid having workstation accounts in passwd file.




WHAT IS IT?
This is an initial working patch to Samba.
With this patch I try to remove the need to have workstation accounts in passwd and leave them only in smbpasswd.


STATUS:
At the moment the patch works but not all the work is done: more testing is needed.
I added a field at the end of a normal smbpasswd entry.
This field is a number representing the RID, it must be present and must terminate with ':'

Ex:
user:500:XX...XX:XX...XX:[U       ]:LCT-87654321:2000:
wks1:60000:XX...XX:XX...XX:[W       ]:LCT-87654321:121000:
Workstation accounts must still have $ at the end of the name and do NOT need to be present in passwd file.
You may use
smbpasswd
to add both user and workstation accounts.
It will automatically create RIDs for users and search a free UID and create RID for workstations. RIDs for users are created in this way: RID=UID*2+1000
RIDs for workstations are created the same and workstation UID are taken from the range 60000-65500.
I used this range because I'm not sure if a value bigger than a short may issue trobubles on some architecture.
Free UID for workstation is searched only in smbpasswd file and generate RIDs are still not checked
in case of duplication, so it is better to not have real user UID in the range 60000-65500.

I've tested the patch with samba as PDC and NT4 SP5 as client.
NT joined successfully the domain and I haven't see any problem with user accounts or machine account.
It works for me but further testing is needed.
THE PATCH:
here you can find the patch.
apply it to the source code and compile.
Foolow above instructions to avoid problems.
Enjoy.

Simo.


AUTHOR:
Simo Sorce


Samba
Home


Simo Sorce simo.sorce@tiscalinet.it
Updated: 2001/05/02 03:08:17
http://web.tiscalinet.it/idraweb/samba-patch.html
Preprocessed by WPP Graphics by GIMP Written with vi
IdraNet Main Page