Author Topic: Users with UID 1*** no longer visible in Zentyal 6.1  (Read 259 times)

oleg.blecher

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Users with UID 1*** no longer visible in Zentyal 6.1
« 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

doncamilo

  • Zen Samurai
  • ****
  • Posts: 331
  • Karma: +68/-1
    • View Profile
Re: Users with UID 1*** no longer visible in Zentyal 6.1
« Reply #1 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"



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!
"That place... is strong with the
dark side of the Force.  A domain
of evil it is.  In you must go."

Yoda.

oleg.blecher

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Users with UID 1*** no longer visible in Zentyal 6.1
« Reply #2 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!