Vitaly Pyslar
2015-Mar-11 15:16 UTC
[Samba] Users and groups named in Russian disappeared after upgrade samba4 PDC
Thanks for the answer.> Did you got errors during the classicupgrade?I didn't do classicupgrade. My Samba AD DC was installed from scratch some months ago using the instructions from this page https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO and everything had been working well. I just upgraded some deb-packages with samba to the same version but different buid-release. Regarding to the changelog there were some bug- and security-fixes.> @all: Didn't we had someone here on the list with a similar problem? > Accounts with chinese characters didn't worked or something like that?I supposed that it could be a characters encoding issue because only users and groups named in Russian disappeared, default administrative accounts and user "dhcpd" that I created manually were available.> About how many accounts do we talk about? Is it worth investigating or > easier recreating?You right. It was 36 accounts and 2 groups, not too many. After all my attempts to fix it I have recreated whole my domain and rejoined all clients. It was very tiresomely but I had no more time to try to repair it. I am still conserned if some day it may happen again. It was strange that restoring backup didn't help. I thought that my operating system can be damaged, so I tried to restore the backup inside an lxc-container. I tried to restore some different backups that have been made in different days and months. No one of them worked. Have all my backups been making broken? To backing up I use the instruction from this page https://wiki.samba.org/index.php/Backup_and_Recovery with little modifications, but I didn't try to restore it before the fault.
Marc Muehlfeld
2015-Mar-11 16:26 UTC
[Samba] Users and groups named in Russian disappeared after upgrade samba4 PDC
Am 11.03.2015 um 16:16 schrieb Vitaly Pyslar:>> Did you got errors during the classicupgrade? > I didn't do classicupgrade. My Samba AD DC was installed from scratch some > months ago using the instructions from this page > https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO and everything had been > working well. I just upgraded some deb-packages with samba to the same version > but different buid-release. Regarding to the changelog there were some bug- and > security-fixes.Hm. if you could create this accounts and they worked, then I don't see a reason, why it should stop working.> I am still conserned if some day it may happen again. It was strange that > restoring backup didn't help. I thought that my operating system can be > damaged, so I tried to restore the backup inside an lxc-container. I tried to > restore some different backups that have been made in different days and months. > No one of them worked. Have all my backups been making broken? To backing up I > use the instruction from this page > https://wiki.samba.org/index.php/Backup_and_Recovery with little modifications, > but I didn't try to restore it before the fault.What modifications? And what was wrong with the restored backup? Did it has the same problems? Or why it wasn't usable? Do you just have one DC? Regards, Marc
Vitaly Pyslar
2015-Mar-12 22:46 UTC
[Samba] Users and groups named in Russian disappeared after upgrade samba4 PDC
> > I tried to restore some different backups that have been made in different > > days and months. No one of them worked. Have all my backups been making > > broken? To backing up I use the instruction from this page > > https://wiki.samba.org/index.php/Backup_and_Recovery with little > > modifications, but I didn't try to restore it before the fault. > > What modifications?There is written in instruction: How LDB and TDB files can be backed-up/restored. you can backup *.ldb & *.tdb files online with 'tdbbackup' But the provided script doesn't make baskups of *.tdb files, only *.ldb so I decided to backup both of them. This is my backup script: ============================================================================= #!/bin/sh BACKUPDIR=/var/backup/samba DAYS=90 DATE=$(date +%y%m%d) if [ ! -d $BACKUPDIR ] then echo "Missing backup directory $BACKUPDIR" exit 1 fi if [ -f $BACKUPDIR/$DATE.tar.bz2 ] then echo "Backup $DATE.tar.bz2 already exists" exit 1 fi if [ -d $BACKUPDIR/$DATE ] then rm -rf $BACKUPDIR/$DATE fi find /var/lib/samba -type f \( -name "*.ldb.bak" -o -name "*.tdb.bak" \) -exec rm -f {} \; for db in $(find /var/lib/samba -type f \( -name "*.ldb" -o -name "*.tdb" \)) do tdbbackup $db if [ $? -ne 0 ]; then echo "Error while backuping $db" exit 1 fi done mkdir $BACKUPDIR/$DATE rsync -aX --exclude='usershares' --exclude='*.ldb' --exclude='*.tdb' /var/lib/samba/* $BACKUPDIR/$DATE/ mkdir $BACKUPDIR/$DATE/etc cp -dpR /etc/samba/* $BACKUPDIR/$DATE/etc/ cd $BACKUPDIR/ for db in $(find . -type f \( -name "*.ldb.bak" -o -name "*.tdb.bak" \)) do mv $db ${db%.bak} done tar -cjf $DATE.tar.bz2 $DATE >/dev/null 2>&1 rm -rf $DATE find /var/lib/samba -type f \( -name "*.ldb.bak" -o -name "*.tdb.bak" \) -exec rm -f {} \; find . -name "*.tar.bz2" -mtime +$DAYS -exec rm {} \; exit 0 ============================================================================= Is it correct? It is launched by cron every night. To restore a backup I stopped the samba service, removed contents of the /var/lib/samba directory, untared the archive there and started the service again. I tried to restore the backup of the previous day, the prevous week and the previous month.> And what was wrong with the restored backup? Did it has the same > problems? Or why it wasn't usable?There was no success, the problem didn't disappear. I know it's a some kind of mistery. Only one logical explanation that I see is that in some point of time my database has become corrupted (don't know why and how) and all the backups have been made with broken data. Long running DC has been working somehow until upgrade restarted it and after that the problem appeared. Hense the reason of the fault might be not the upgrade, it could have happened before somewhere else. I don't know what could it be, all that I've done since then I have installed the DC added/removed users via ADUC.> Do you just have one DC?Yes. I know I had to have a secondary domain member server for redundancy but unfortunately I don't have it right now. The company I talk about is very small, the hardware of the current server is quite powerful and reliable so they won't to buy one more server only for another samba instance. I decided to run both DCs - primary and secondary in separate lxc-containers or in virtual maschines and snapshot them periodically. I hope it will help me to restore quickly the whole environment in case of a fault. Thanks a lot for your help.
Seemingly Similar Threads
- Users and groups named in Russian disappeared after upgrade samba4 PDC
- Users and groups named in Russian disappeared after upgrade samba4 PDC
- Users and groups named in Russian disappeared after upgrade samba4 PDC
- samba 4.0.x : samba_backup wrong path line 54
- Russian translators: living countries