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
On Thu, 20 Jan 2000 14:29:54 +1100, hai scritto:>How can I physically remove this user ID from the smbpasswd file when I >delete this user.For now "grep -v" is your friend. In samba-2.0.7 I think there will be a new switch to smbpasswd to remove an account from the smbpasswd database. -- giulioo@pobox.com
>My issue is when I try to create a UNIX and SAMBA account using thesame >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. Can I make the suggestion that you leave the users on the system? Just disable / lock the accounts but leave them on the system. This obviously would not be a good idea if you have a large number of users in the system, or a lot of users needing to be added or removed regularly. Two reasons for this suggestion: 1) The new user doesn't inherit ownership of files which were previously owned by an old (removed) user. 2) It is very clear who owns particular files on the server, and these files can be reassigned to a different user at a later date. Better than the owners being a list of UIDs! ====================================== This message contains information which may be confidential or privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received this message in error, please advise the sender by reply e-mail @sdli.com, and delete the message. Thank you for your cooperation. SDL, Inc.