[Samba] changing the primary group of a user

Guido Lorenzutti guido at lorenzutti.com.ar
Tue Jul 5 04:02:52 GMT 2005


Im having a strange problem... I have a few users created (few = 100) 
with gid = to uid.
Like this:

dlanger:x:1229:1229::/home/dlanger:/bin/false
jbranca:x:1230:1230::/home/jbranca:/bin/false
cdobenau:x:1231:1231::/home/cdobenau:/bin/false
sbarabani:x:1232:1232::/home/sbarabani:/bin/false

And i have a the new ones like this:

nharrington:x:1233:100::/home/nharrington:/bin/false
stbrusco:x:1234:100::/home/stbrusco:/bin/false
syahia:x:1235:100::/home/syahia:/bin/false

Now the thing is if i change the old and bad ones to the primary gid of 
100 (users) this users can't login anymore!
Even more! if i delete the users from samba, i can't create them again!!

With the following error:

  smbpasswd -a ppacheco -D 100
Netbios name list:-
my_netbios_names[0]="SERVER"
Trying to load: tdbsam
Attempting to register passdb backend ldapsam
Successfully added passdb backend 'ldapsam'
Attempting to register passdb backend ldapsam_compat
Successfully added passdb backend 'ldapsam_compat'
Attempting to register passdb backend NDS_ldapsam
Successfully added passdb backend 'NDS_ldapsam'
Attempting to register passdb backend NDS_ldapsam_compat
Successfully added passdb backend 'NDS_ldapsam_compat'
Attempting to register passdb backend smbpasswd
Successfully added passdb backend 'smbpasswd'
Attempting to register passdb backend tdbsam
Successfully added passdb backend 'tdbsam'
Attempting to register passdb backend guest
Successfully added passdb backend 'guest'
Attempting to find an passdb backend to match tdbsam (tdbsam)
Found pdb backend tdbsam
pdb backend tdbsam has a valid init
Attempting to find an passdb backend to match guest (guest)
Found pdb backend guest
pdb backend guest has a valid init
New SMB password:
Retype new SMB password:
pdb_getsampwnam (TDB): error fetching database.
  Error: Record does not exist
  Key: USER_ppacheco
Finding user ppacheco
Trying _Get_Pwnam(), username as lowercase is ppacheco
Get_Pwnam_internals did find user [ppacheco]!
pdb_set_username: setting username ppacheco, was
element 12 -> now SET
pdb_set_full_name: setting full name Pachekin, was
element 13 -> now SET
pdb_set_unix_homedir: setting home dir /home/ppacheco, was NULL
element 22 -> now SET
pdb_set_domain: setting domain CYF, was
element 14 -> now DEFAULT
pdb_set_user_sid: setting user sid 
S-1-5-21-1644118684-451077198-3181867690-2264
element 18 -> now SET
pdb_set_user_sid_from_rid:
         setting user sid S-1-5-21-1644118684-451077198-3181867690-2264 
from rid 2264
tdb_pack(ddff, 1024) -> 24
tdb_pack(ddff, 1024) -> 15
tdb_pack(ddff, 1024) -> 16
tdb_pack(ddff, 1024) -> 21
tdb_pack(ddff, 1024) -> 27
tdb_pack(ddff, 1024) -> 26
tdb_pack(ddff, 1024) -> 25
tdb_pack(ddff, 1024) -> 26
tdb_pack(ddff, 1024) -> 21
tdb_pack(ddff, 1024) -> 23
tdb_pack(ddff, 1024) -> 22
tdb_pack(ddff, 1024) -> 23
tdb_unpack(ddff, 26) -> 26
tdb_unpack(ddff, 21) -> 21
tdb_unpack(ddff, 16) -> 16
tdb_unpack(ddff, 21) -> 21
tdb_unpack(ddff, 25) -> 25
tdb_unpack(ddff, 24) -> 24
tdb_unpack(ddff, 27) -> 27
tdb_unpack(ddff, 23) -> 23
tdb_unpack(ddff, 23) -> 23
tdb_unpack(ddff, 26) -> 26
tdb_unpack(ddff, 15) -> 15
pdb_set_group_sid: setting group sid S-1-5-32-545
element 19 -> now SET
Home server: server
pdb_set_profile_path: setting profile path \\server\profiles\ppacheco, was
element 2 -> now DEFAULT
Home server: server
pdb_set_homedir: setting home dir \\server\profiles\ppacheco, was
element 1 -> now DEFAULT
pdb_set_dir_drive: setting dir drive c:, was NULL
element 3 -> now DEFAULT
pdb_set_logon_script: setting logon script netlogon.ppacheco.bat, was
element 4 -> now DEFAULT
element 20 -> now DEFAULT
pdb_init_sam_new: no RID specified.  Generating one via old algorithm
pdb_set_user_sid: setting user sid 
S-1-5-21-1644118684-451077198-3181867690-2264
element 18 -> now SET
pdb_set_user_sid_from_rid:
         setting user sid S-1-5-21-1644118684-451077198-3181867690-2264 
from rid 2264
element 20 -> now CHANGED
element 20 -> now CHANGED
element 33 -> now CHANGED
element 32 -> now CHANGED
element 11 -> now CHANGED
element 21 -> now CHANGED
grant_privilege: S-1-1-0
original privilege mask:
SE_PRIV  0x8275580 0x8275d58 0x817f50d 0xd
new privilege mask:
SE_PRIV  0x0 0x0 0x0 0x0
grant_privilege: S-1-5-32-544
original privilege mask:
SE_PRIV  0x8275580 0x8275d58 0x817f50d 0xd
new privilege mask:
SE_PRIV  0x0 0x0 0x0 0x0
grant_privilege: S-1-5-32-548
original privilege mask:
SE_PRIV  0x8275580 0x8275d58 0x817f50d 0xd
new privilege mask:
SE_PRIV  0x0 0x0 0x0 0x0
grant_privilege: S-1-5-32-549
original privilege mask:
SE_PRIV  0x8275580 0x8275d58 0x817f50d 0xd
new privilege mask:
SE_PRIV  0x0 0x0 0x0 0x0
grant_privilege: S-1-5-32-550
original privilege mask:
SE_PRIV  0x8275580 0x8275d58 0x817f50d 0xd
new privilege mask:
SE_PRIV  0x0 0x0 0x0 0x0
grant_privilege: S-1-5-32-551
original privilege mask:
SE_PRIV  0x8275580 0x8275d58 0x817f50d 0xd
new privilege mask:
SE_PRIV  0x0 0x0 0x0 0x0
account_policy_get: maximum password age:15552000
element 10 -> now CHANGED
account_policy_get: minimum password age:0
element 9 -> now CHANGED
account_policy_get: password history:0
element 34 -> now CHANGED
tdb_update_sam: Failing to store a SAM_ACCOUNT for [ppacheco] without a 
primary group RID
Failed to add entry for user ppacheco.
Failed to modify password entry for user ppacheco

pdbedit -Lv ppacheco
Username not found!





Now if i change the gid of the user to = uid everything works just fine 
and the user is able to be created and used.

Any ideas?


More information about the samba mailing list