[Samba] Classic Upgrade changes domain SID

Rowland Penny rpenny at samba.org
Sun Aug 27 13:09:18 UTC 2023


On Sun, 27 Aug 2023 14:36:49 +0200
Peter Koch via samba <samba at lists.samba.org> wrote:

> >> here's what I did:
> >>
> >>
> >> 5) created all samba-related user-accounts, groups and
> >> groupmappings with:
> >> (awk -F: '$3>=200 && $3<60000{print "groupadd
> >> -g",$3,$1}'/var/samba/NT4-DC/group | sort awk -F: '$3>=500 &&
> >> $3<20000{g=$4;if(g==65534)g="nogroup"; print "useradd
> >> -u",$3,"-g",g,"\x27"$1"\x27"}' /var/samba/NT4-DC/passwd | sort awk
> >> -F: '$3>=200 && $3<60000{split($4,a,",");for(i in a) print
> >> "usermod -aG",$1,a[i]}' /var/samba/NT4-DC/group ) | sh
> >>
> >> 6) replaced SERV00 by the netbios name of the new server (i.e.
> >> NS1) in /var/samba/NT4-DC/smb.conf
> >>
>

I think your problems all stem from doing number 5 on your 'what I did'
list.

You do not want those users and groups in /etc/passwd and /etc/group,
they will all come from AD once it is working.

Also the 'netbios name' in smb.conf on your new DC must match the DCs
short hostname.

Have you read this:
https://wiki.samba.org/index.php/Migrating_a_Samba_NT4_Domain_to_Samba_AD_(Classic_Upgrade)

I suggest you try again.

Rowland



More information about the samba mailing list