Joining a Samba server to an Active Directory Domain fails


# net ads join member -U Administrator
Failed to join domain: Failed to set machine spn: Constraint violation
Do you have sufficient permissions to create machine accounts?


Simple cause, found after hours and hours:

In the smb.conf were some netbios alias definitions, of which one was already defined in some other hosts SPN.

Either remove the spn from the other host, delete this (in my case) obsolete, old host or remove this alias from smb.conf.


[ add comment ] ( 441 views ) permalink

Since there was no sysresccd with current ZoL 0.6.5.2 modules available I looked around for an alternative.
At http://voidmain.is-a-geek.net/redhat/fe ... cking.html I found a recipe for a custom Fedora-Live-CD.

Follow these steps to create a ZFS-Live-CD:
(I used a Fedora-Live-Xfce-x86_64-21-5.iso I had at hand on my Fedora 21 WS)

Start with a new working directory
mkdir Fedora-Live
cd Fedora-Live
Unpack the Fedora-Live ISO
mkdir iso
mount -o ro,loop Fedora-Live.iso iso
mkdir source
cp -a iso/* source
umount iso
Extract the embedded ext-FS
unsquashfs source/LiveOS/squashfs.img
Extend the ext-FS. Alternatively remove unneded packages inside the chroot. See below.
truncate -s4G squashfs-root/LiveOS/ext3fs.img
resize2fs squashfs-root/LiveOS/ext3fs.img
Mount the ext-FS to chroot into it
mkdir ext3fs
mount -o loop squashfs-root/LiveOS/ext3fs.img ext3fs
mount -o bind /proc ext3fs/proc
mount -o bind /dev ext3fs/dev
mount -o bind /sys ext3fs/sys
cp /etc/resolv.conf ext3fs/etc/
chroot ext3fs
I did remove a bunch of unneeded packages and unused leave packages instead of extending the fs.
One could of course remove even more packages (or single files) to make the system fit on a 512MB stick.
yum erase -y xf* *font* web* *theme* xorg* *gtk* gst* mesa* selinux* trans* tele* pulse* esp*
while package-cleanup --quiet --leaves --exclude-bin | xargs yum remove -y; do true ; done
The ZFS install is straight forward.
yum install -y http://archive.zfsonlinux.org/fedora/zfs-release$(rpm -E %dist).noarch.rpm
yum install -y zfs kernel-devel-$(rpm -q kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n')
dkms status
Exit from the chroot
exit
Copy your current locale settings
cp /etc/vconsole.conf ext3fs/etc/
cp /etc/locale.conf ext3fs/etc/
cp -P /etc/localtime ext3fs/etc/
Instruct getty to autologin root
vi ext3fs/lib/systemd/system/getty@.service

ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM
Clean the unused space for better compression
dd if=/dev/zero bs=128k of=ext3fs/zero
sync
rm -f ext3fs/zero
Unmount the ext-FS and make the squashfs
umount ext3fs/sys
umount ext3fs/proc
umount ext3fs/dev
umount ext3fs
mksquashfs squashfs-root source/LiveOS/squashfs.img -noappend
Update the isolinux configuration with a new cd label, add selinux=0 and remove quiet and rhgb
vi source/isolinux/isolinux.cfg

CDLABEL=ZFS-Live selinux=0

vi source/EFI/BOOT/grub.cfg

LABEL=ZFS-Live selinux=0
Make the new ISO
mkisofs -o ZFS-Live.iso -J -r -hide-rr-moved -hide-joliet-trans-tbl -V ZFS-Live -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table source
Burn to CD or copy to usb flash
livecd-iso-to-disk --format --label ZFS-Live ZFS-Live.iso /dev/sd?-of-your-usb-disk

Done.
[ add comment ] ( 2062 views ) permalink

| 1 |