Zentyal Forum, Linux Small Business Server

Zentyal Server => Directory and Authentication => Topic started by: oleg.blecher on December 30, 2019, 05:49:32 pm

Title: Users with UID 1*** no longer visible in Zentyal 6.1
Post by: oleg.blecher on December 30, 2019, 05:49:32 pm
Hi everyone!

Before moving to Zentyal 5.0 and AD, my company used a simple Samba server for everything. Those users have UIDs like 1003, 1104 etc (like regular Unix users).

I've been having problems with seeing them and the old groups in Zentyal, but after upgrading to 6.1 with the nice new GUI (it's really nice!) I don't see them at all anymore, but I can still make changes with samba-tool/getent etc.

How can I configure Zentyal to see them? All the newer users have UIDs like 65541, 65577 etc.

All the best
Title: Re: Users with UID 1*** no longer visible in Zentyal 6.1
Post by: doncamilo on December 31, 2019, 12:54:37 pm
 :)

You could try to change the uids:

Code: [Select]
root@zen61:~# wbinfo -i frodo
LAB61\frodo:*:65536:2513::/home/frodo:/bin/bash
root@zen61:~# wbinfo --uid-to-sid=65539
S-1-5-21-2654250243-2572456098-937980520-1105
root@zen61:~# ldbedit -e vim -H /var/lib/samba/private/sam.ldb objectsid=S-1-5-21-2654250243-2572456098-937980520-1105

You can use nano or some other editor in the command below. It will open the ldb record in the choosen editor. change the parameter "uidNumber: 65536" for (example) "uidNumber: 65539"

(https://i.ibb.co/J7Xd7Fm/ldbedit.png)

Code: [Select]
root@zen61:~# net cache flush
root@zen61:~# wbinfo -i frodo
LAB61\frodo:*:65539:2513::/home/frodo:/bin/bash

You can check the existing uids this way:

Code: [Select]
root@zen61:~# for user in `wbinfo -u`;do wbinfo -i $user;done;
LAB61\administrator:*:2500:2513::/home/administrator:/bin/bash
LAB61\guest:*:65534:2513::/home/guest:/bin/bash
LAB61\krbtgt:*:3000018:2513::/home/krbtgt:/bin/bash
LAB61\dns-zen61:*:3000019:2513::/home/dns-zen61:/bin/bash
LAB61\bilbo:*:65535:2513::/home/bilbo:/bin/bash
LAB61\frodo:*:65536:2513::/home/frodo:/bin/bash
LAB61\gandalf:*:65537:2513::/home/gandalf:/bin/bash
LAB61\admindc:*:65538:2513::/home/admindc:/bin/bash
LAB61\zentyal-squid-zen61:*:3000020:2513::/home/zentyal-squid-zen61:/bin/bash

Use the nexts  free uids in the range which samba uses for the new users.

Merry Christmas and Happy New Year!
Title: Re: Users with UID 1*** no longer visible in Zentyal 6.1
Post by: oleg.blecher on January 10, 2020, 11:38:31 am
Finally had the option to try this, works like a charm! No issues whatsoever on domain-joined Windows or Linux machines (e.g our NAS-fileserver).

Thanks @doncamilo!
Title: Re: Users with UID 1*** no longer visible in Zentyal 6.1
Post by: ATT1 on February 18, 2020, 04:04:33 pm
I have the same question but I don't have installed "wbinfo" in old Zentyal 4.1
"apt-cache search wbinfo" does not find anything.
Where to find wbinfo, now ?
Title: Re: Users with UID 1*** no longer visible in Zentyal 6.1
Post by: nickpiggott on May 23, 2020, 08:09:55 pm
I'm having the same problem.

Why was this behaviour changed?

I don't want to have to renumber my users as presumably I'll have to change all their file ownership permissions in Linux to match the new numbers?