pdbedit ignores all arguments of -U and/or -G disallowing user from modifying or setting SID and/or GID during account creation. This behavior has occured for all versions of samba3.x.x on FreeBSD 5.x as well as Linux that I have had the chance to test. Example below is my personal FedoraCore4 on x86_64 system; [root@amd64 john]# pdbedit -a -u john -U 'S-1-5-21-1945233005-1863365651-195713610-5000' new password: retype new password: Unix username: john NT username: Account Flags: [U ] User SID: S-1-5-21-1945233005-1863365651-195713610-2000 Primary Group SID: S-1-5-21-1945233005-1863365651-195713610-2001 Full Name: Home Directory: \\amd64\john HomeDir Drive: Logon Script: Profile Path: \\amd64\john\profile Domain: AMD64 Account desc: Workstations: Munged dial: Logon time: 0 Logoff time: 9223372036854775807 seconds since the Epoch Kickoff time: 9223372036854775807 seconds since the Epoch Password last set: Tue, 09 Aug 2005 04:23:53 GMT Password can change: Tue, 09 Aug 2005 04:23:53 GMT Password must change: 9223372036854775807 seconds since the Epoch Last bad password : 0 Bad password count : 0 Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Created attachment 1570 [details] pdbedit recognize -U and -G as user account modify options In samba 3.0.20b I just checked that on creation the -U option is honoured. Anyway it is not honoured if it is the only one on the commandline meaning you want to modify it (eg you do not give the -r option to explicitly modify the entry). The attacched patch should solve the problem.
this was fixed, but the bug not closed fixing