# /liu/bin/net groupmap list Guests (S-1-5-32-546) -> -1294967288 Administrators (S-1-5-32-544) -> -1294967290 Users (S-1-5-32-545) -> -1294967289 # /liu/bin/net groupmap list verbose Guests SID : S-1-5-32-546 Unix gid : 3000000008 Unix group: -1294967288 Group type: Local Group Comment : Administrators SID : S-1-5-32-544 Unix gid : 3000000006 Unix group: -1294967290 Group type: Local Group Comment : Users SID : S-1-5-32-545 Unix gid : 3000000007 Unix group: -1294967289 Group type: Local Group Comment : The "problem" is located in source3/lib/util.c: gidtoname() and uidtoname() where there is a talloc_asprintf(... "%d", (int) gid) in gidtoname() if can't make the gid to a valid group name. (and "%ld" in uidtoname). Perhaps should be changed to "%u" (optionally with a check for some "small" negative numbers like (int)gid == -1 (and -2 which might be easier to read when printed as negative numbers...
(In reply to Peter Eriksson from comment #0) Hi Peter, could this be a freeBSD problem ? I ask this because on Debian, using Samba 4.23.6 with 'idmap config * : range = 3000000000-3100000000' in the smb.conf file, I get: $ sudo net groupmap list Guests (S-1-5-32-546) -> BUILTIN\guests Administrators (S-1-5-32-544) -> BUILTIN\administrators Users (S-1-5-32-545) -> BUILTIN\users $ sudo net groupmap list verbose Guests SID : S-1-5-32-546 Unix gid : 3000000002 Unix group: BUILTIN\guests Group type: Local Group Comment : Administrators SID : S-1-5-32-544 Unix gid : 3000000000 Unix group: BUILTIN\administrators Group type: Local Group Comment : Users SID : S-1-5-32-545 Unix gid : 3000000001 Unix group: BUILTIN\users Group type: Local Group Comment :