Removing the user account from the smbpasswd file

Jasmine CHYE J.Chye at silicomp.com.sg
Thu Jan 20 03:17:48 GMT 2000



Hi

I am Jasmine CHYE from Singapore. I had been working and using on the
SAMBA since OCT '99.

Right now I was writing an application to create SAMBA user account.  My
application goes like this:

First I create a UNIX user account using the "useradd ...".
Then I create the SAMBA account using the "smbpasswd -ae userid".
I understand that when creating the SAMBA account, it look for the uid
of this user in the UNIX passwd found.  This is fine.  

When I delete the user account, I first delete SAMBA account, using the
"smbpasswd -d userid".  This will disable the user in the smbpasswd
file.  This mean that the userID and uid still reside in the smbpasswd
file. Then I delete the UNIX account, using the "userdel ...".  This
will removed the userID from the UNIX passwd file.   

My issue is when I try to create a UNIX and SAMBA account using the same
user ID.
UNIX will create this user and the uid of this user is likely to be
difference from the previous creation.
SAMBA will create this user using the uid of this user.

This means that there are two similar user ID with difference uid in the
smbpasswd file.  So when the user tries to login from the NT W/S, the NT
prompt is that the user had been disable.  

How can I physically remove this user ID from the smbpasswd file when I
delete this user.



Thank you

Regards 

Jasmine CHYE
Senior Development Engineer


Silicomp Asia Pte Ltd
73 CINTECH I, #03-11,
Singapore Science Park Drive,
Singapore Science Park I
Postal Code 118254
Singapore



More information about the samba mailing list