Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
sbin /
[ HOME SHELL ]
Name
Size
Permission
Action
ModemManager
2.09
MB
-rwxr-xr-x
a2disconf
15.89
KB
-rwxr-xr-x
a2dismod
15.89
KB
-rwxr-xr-x
a2dissite
15.89
KB
-rwxr-xr-x
a2enconf
15.89
KB
-rwxr-xr-x
a2enmod
15.89
KB
-rwxr-xr-x
a2ensite
15.89
KB
-rwxr-xr-x
a2query
9.64
KB
-rwxr-xr-x
aa-remove-unknown
3
KB
-rwxr-xr-x
aa-status
62.62
KB
-rwxr-xr-x
aa-teardown
137
B
-rwxr-xr-x
accessdb
14.55
KB
-rwxr-xr-x
adcli
160.82
KB
-rwxr-xr-x
add-shell
1.03
KB
-rwxr-xr-x
addgnupghome
3
KB
-rwxr-xr-x
addgroup
37.35
KB
-rwxr-xr-x
adduser
37.35
KB
-rwxr-xr-x
agetty
55.56
KB
-rwxr-xr-x
apache2
740.89
KB
-rwxr-xr-x
apache2ctl
7.06
KB
-rwxr-xr-x
apachectl
7.06
KB
-rwxr-xr-x
apparmor_parser
1.48
MB
-rwxr-xr-x
apparmor_status
62.62
KB
-rwxr-xr-x
applygnupgdefaults
2.17
KB
-rwxr-xr-x
arp
61.61
KB
-rwxr-xr-x
arpd
26.33
KB
-rwxr-xr-x
arptables
219.04
KB
-rwxr-xr-x
arptables-nft
219.04
KB
-rwxr-xr-x
arptables-nft-restore
219.04
KB
-rwxr-xr-x
arptables-nft-save
219.04
KB
-rwxr-xr-x
arptables-restore
219.04
KB
-rwxr-xr-x
arptables-save
219.04
KB
-rwxr-xr-x
avcstat
14.3
KB
-rwxr-xr-x
badblocks
34.32
KB
-rwxr-xr-x
bcache-super-show
14.3
KB
-rwxr-xr-x
biosdecode
23.2
KB
-rwxr-xr-x
blkdeactivate
15.97
KB
-rwxr-xr-x
blkdiscard
22.38
KB
-rwxr-xr-x
blkid
50.41
KB
-rwxr-xr-x
blkzone
34.38
KB
-rwxr-xr-x
blockdev
30.38
KB
-rwxr-xr-x
bridge
92.49
KB
-rwxr-xr-x
cache_check
1.33
MB
-rwxr-xr-x
cache_dump
1.33
MB
-rwxr-xr-x
cache_metadata_size
1.33
MB
-rwxr-xr-x
cache_repair
1.33
MB
-rwxr-xr-x
cache_restore
1.33
MB
-rwxr-xr-x
cache_writeback
1.33
MB
-rwxr-xr-x
capsh
30.3
KB
-rwxr-xr-x
cfdisk
94.73
KB
-rwxr-xr-x
cgdisk
150.48
KB
-rwxr-xr-x
chcpu
30.38
KB
-rwxr-xr-x
check-selinux-installation
663
B
-rwxr-xr-x
check_forensic
952
B
-rwxr-xr-x
chgpasswd
58.13
KB
-rwxr-xr-x
chmem
34.38
KB
-rwxr-xr-x
chpasswd
54.16
KB
-rwxr-xr-x
chroot
38.5
KB
-rwxr-xr-x
compute_av
14.3
KB
-rwxr-xr-x
compute_create
14.3
KB
-rwxr-xr-x
compute_member
14.3
KB
-rwxr-xr-x
compute_relabel
14.3
KB
-rwxr-xr-x
cpgr
48.29
KB
-rwxr-xr-x
cppw
48.29
KB
-rwxr-xr-x
cracklib-check
14.15
KB
-rwxr-xr-x
cracklib-format
231
B
-rwxr-xr-x
cracklib-packer
14.15
KB
-rwxr-xr-x
cracklib-unpacker
14.15
KB
-rwxr-xr-x
create-cracklib-dict
990
B
-rwxr-xr-x
cron
50.58
KB
-rwxr-xr-x
cryptdisks_start
1.51
KB
-rwxr-xr-x
cryptdisks_stop
844
B
-rwxr-xr-x
cryptsetup
169.55
KB
-rwxr-xr-x
cryptsetup-reencrypt
90.38
KB
-rwxr-xr-x
cryptsetup-ssh
23.53
KB
-rwxr-xr-x
ctrlaltdel
14.38
KB
-rwxr-xr-x
dbconfig-generate-include
12.36
KB
-rwxr-xr-x
dbconfig-load-include
5.57
KB
-rwxr-xr-x
dcb
80.52
KB
-rwxr-xr-x
debugfs
229.8
KB
-rwxr-xr-x
delgroup
16.11
KB
-rwxr-xr-x
deluser
16.11
KB
-rwxr-xr-x
depmod
166.36
KB
-rwxr-xr-x
devlink
142.86
KB
-rwxr-xr-x
dhclient
442.66
KB
-rwxr-xr-x
dhclient-script
15.92
KB
-rwxr-xr-x
dmeventd
50.38
KB
-rwxr-xr-x
dmidecode
118.98
KB
-rwxr-xr-x
dmsetup
171.01
KB
-rwxr-xr-x
dmstats
171.01
KB
-rwxr-xr-x
dosfsck
82.38
KB
-rwxr-xr-x
dosfslabel
38.38
KB
-rwxr-xr-x
dpkg-preconfigure
3.58
KB
-rwxr-xr-x
dpkg-reconfigure
4.38
KB
-rwxr-xr-x
dumpe2fs
30.31
KB
-rwxr-xr-x
e2freefrag
14.3
KB
-rwxr-xr-x
e2fsck
351.84
KB
-rwxr-xr-x
e2image
42.31
KB
-rwxr-xr-x
e2label
102.55
KB
-rwxr-xr-x
e2mmpstatus
30.31
KB
-rwxr-xr-x
e2scrub
7.13
KB
-rwxr-xr-x
e2scrub_all
5.27
KB
-rwxr-xr-x
e2undo
22.3
KB
-rwxr-xr-x
e4crypt
30.38
KB
-rwxr-xr-x
e4defrag
30.3
KB
-rwxr-xr-x
ebtables
219.04
KB
-rwxr-xr-x
ebtables-nft
219.04
KB
-rwxr-xr-x
ebtables-nft-restore
219.04
KB
-rwxr-xr-x
ebtables-nft-save
219.04
KB
-rwxr-xr-x
ebtables-restore
219.04
KB
-rwxr-xr-x
ebtables-save
219.04
KB
-rwxr-xr-x
era_check
1.33
MB
-rwxr-xr-x
era_dump
1.33
MB
-rwxr-xr-x
era_invalidate
1.33
MB
-rwxr-xr-x
era_restore
1.33
MB
-rwxr-xr-x
ethtool
551.48
KB
-rwxr-xr-x
eventlogadm
482.38
KB
-rwxr-xr-x
faillock
14.15
KB
-rwxr-xr-x
fatlabel
38.38
KB
-rwxr-xr-x
fdisk
110.42
KB
-rwxr-xr-x
filefrag
18.32
KB
-rwxr-xr-x
findfs
14.38
KB
-rwxr-xr-x
fixfiles
11.32
KB
-rwxr-xr-x
fixparts
58.48
KB
-rwxr-xr-x
fsadm
23.94
KB
-rwxr-xr-x
fsck
42.42
KB
-rwxr-xr-x
fsck.btrfs
1.16
KB
-rwxr-xr-x
fsck.cramfs
30.44
KB
-rwxr-xr-x
fsck.ext2
351.84
KB
-rwxr-xr-x
fsck.ext3
351.84
KB
-rwxr-xr-x
fsck.ext4
351.84
KB
-rwxr-xr-x
fsck.fat
82.38
KB
-rwxr-xr-x
fsck.minix
54.41
KB
-rwxr-xr-x
fsck.msdos
82.38
KB
-rwxr-xr-x
fsck.vfat
82.38
KB
-rwxr-xr-x
fsck.xfs
1.92
KB
-rwxr-xr-x
fsfreeze
14.38
KB
-rwxr-xr-x
fstab-decode
18.3
KB
-rwxr-xr-x
fstrim
42.38
KB
-rwxr-xr-x
gdisk
174.48
KB
-rwxr-xr-x
genhomedircon
27.03
KB
-rwxr-xr-x
genl
90.44
KB
-rwxr-xr-x
getcap
14.3
KB
-rwxr-xr-x
getconlist
14.3
KB
-rwxr-xr-x
getdefaultcon
14.3
KB
-rwxr-xr-x
getenforce
14.3
KB
-rwxr-xr-x
getfilecon
14.3
KB
-rwxr-xr-x
getpcaps
14.3
KB
-rwxr-xr-x
getpidcon
14.3
KB
-rwxr-xr-x
getsebool
14.3
KB
-rwxr-xr-x
getseuser
14.3
KB
-rwxr-xr-x
getty
55.56
KB
-rwxr-xr-x
groupadd
66.91
KB
-rwxr-xr-x
groupdel
62.73
KB
-rwxr-xr-x
groupmems
54.19
KB
-rwxr-xr-x
groupmod
66.82
KB
-rwxr-xr-x
grpck
58.13
KB
-rwxr-xr-x
grpconv
50.01
KB
-rwxr-xr-x
grpunconv
50.01
KB
-rwxr-xr-x
grub-bios-setup
941.42
KB
-rwxr-xr-x
grub-install
1.15
MB
-rwxr-xr-x
grub-macbless
929.11
KB
-rwxr-xr-x
grub-mkconfig
8.6
KB
-rwxr-xr-x
grub-mkdevicemap
215.7
KB
-rwxr-xr-x
grub-probe
941.36
KB
-rwxr-xr-x
grub-reboot
4.73
KB
-rwxr-xr-x
grub-set-default
3.47
KB
-rwxr-xr-x
halt
1.06
MB
-rwxr-xr-x
hdparm
139.43
KB
-rwxr-xr-x
httxt2dbm
14.3
KB
-rwxr-xr-x
hwclock
50.5
KB
-rwxr-xr-x
iconvconfig
30.4
KB
-rwxr-xr-x
ifconfig
77.17
KB
-rwxr-xr-x
init
1.76
MB
-rwxr-xr-x
insmod
166.36
KB
-rwxr-xr-x
installkernel
2.6
KB
-rwxr-xr-x
integritysetup
54.07
KB
-rwxr-xr-x
invoke-rc.d
16.12
KB
-rwxr-xr-x
ip
702.05
KB
-rwxr-xr-x
ip6tables
219.04
KB
-rwxr-xr-x
ip6tables-apply
6.89
KB
-rwxr-xr-x
ip6tables-legacy
96.95
KB
-rwxr-xr-x
ip6tables-legacy-restore
96.95
KB
-rwxr-xr-x
ip6tables-legacy-save
96.95
KB
-rwxr-xr-x
ip6tables-nft
219.04
KB
-rwxr-xr-x
ip6tables-nft-restore
219.04
KB
-rwxr-xr-x
ip6tables-nft-save
219.04
KB
-rwxr-xr-x
ip6tables-restore
219.04
KB
-rwxr-xr-x
ip6tables-restore-translate
219.04
KB
-rwxr-xr-x
ip6tables-save
219.04
KB
-rwxr-xr-x
ip6tables-translate
219.04
KB
-rwxr-xr-x
ipmaddr
18.3
KB
-rwxr-xr-x
iptables
219.04
KB
-rwxr-xr-x
iptables-apply
6.89
KB
-rwxr-xr-x
iptables-legacy
96.95
KB
-rwxr-xr-x
iptables-legacy-restore
96.95
KB
-rwxr-xr-x
iptables-legacy-save
96.95
KB
-rwxr-xr-x
iptables-nft
219.04
KB
-rwxr-xr-x
iptables-nft-restore
219.04
KB
-rwxr-xr-x
iptables-nft-save
219.04
KB
-rwxr-xr-x
iptables-restore
219.04
KB
-rwxr-xr-x
iptables-restore-translate
219.04
KB
-rwxr-xr-x
iptables-save
219.04
KB
-rwxr-xr-x
iptables-translate
219.04
KB
-rwxr-xr-x
iptunnel
18.3
KB
-rwxr-xr-x
irqbalance
66.86
KB
-rwxr-xr-x
irqbalance-ui
34.38
KB
-rwxr-xr-x
iscsi-iname
14.3
KB
-rwxr-xr-x
iscsi_discovery
5.17
KB
-rwxr-xr-x
iscsiadm
398.46
KB
-rwxr-xr-x
iscsid
298.55
KB
-rwxr-xr-x
iscsistart
274.56
KB
-rwxr-xr-x
isosize
14.38
KB
-rwxr-xr-x
iucode-tool
58.34
KB
-rwxr-xr-x
iucode_tool
58.34
KB
-rwxr-xr-x
kadmin.local
82.45
KB
-rwxr-xr-x
kadmind
114.41
KB
-rwxr-xr-x
kbdrate
18.16
KB
-rwxr-xr-x
kdb5_util
95.54
KB
-rwxr-xr-x
killall5
30.38
KB
-rwxr-xr-x
kpartx
46.16
KB
-rwxr-xr-x
kprop
22.34
KB
-rwxr-xr-x
kproplog
22.3
KB
-rwxr-xr-x
krb5_newrealm
1.61
KB
-rwxr-xr-x
krb5kdc
146.6
KB
-rwxr-xr-x
ldattach
26.38
KB
-rwxr-xr-x
ldconfig
387
B
-rwxr-xr-x
ldconfig.real
1.16
MB
-rwxr-xr-x
load_policy
14.3
KB
-rwxr-xr-x
locale-gen
4.29
KB
-rwxr-xr-x
logrotate
102.24
KB
-rwxr-xr-x
logsave
14.16
KB
-rwxr-xr-x
losetup
70.52
KB
-rwxr-xr-x
lsmod
166.36
KB
-rwxr-xr-x
luksformat
3.32
KB
-rwxr-xr-x
lvchange
2.89
MB
-rwxr-xr-x
lvconvert
2.89
MB
-rwxr-xr-x
lvcreate
2.89
MB
-rwxr-xr-x
lvdisplay
2.89
MB
-rwxr-xr-x
lvextend
2.89
MB
-rwxr-xr-x
lvm
2.89
MB
-rwxr-xr-x
lvmconfig
2.89
MB
-rwxr-xr-x
lvmdiskscan
2.89
MB
-rwxr-xr-x
lvmdump
10.07
KB
-rwxr-xr-x
lvmpolld
236.34
KB
-rwxr-xr-x
lvmsadc
2.89
MB
-rwxr-xr-x
lvmsar
2.89
MB
-rwxr-xr-x
lvreduce
2.89
MB
-rwxr-xr-x
lvremove
2.89
MB
-rwxr-xr-x
lvrename
2.89
MB
-rwxr-xr-x
lvresize
2.89
MB
-rwxr-xr-x
lvs
2.89
MB
-rwxr-xr-x
lvscan
2.89
MB
-rwxr-xr-x
make-bcache
22.38
KB
-rwxr-xr-x
make-ssl-cert
6.65
KB
-rwxr-xr-x
mariadbd
24.33
MB
-rwxr-xr-x
matchpathcon
14.3
KB
-rwxr-xr-x
mdadm
601.31
KB
-rwxr-xr-x
mdmon
258.44
KB
-rwxr-xr-x
mii-tool
26.73
KB
-rwxr-xr-x
mkdosfs
50.83
KB
-rwxr-xr-x
mke2fs
130.62
KB
-rwxr-xr-x
mkfs
14.38
KB
-rwxr-xr-x
mkfs.bfs
22.38
KB
-rwxr-xr-x
mkfs.btrfs
471.25
KB
-rwxr-xr-x
mkfs.cramfs
34.32
KB
-rwxr-xr-x
mkfs.ext2
130.62
KB
-rwxr-xr-x
mkfs.ext3
130.62
KB
-rwxr-xr-x
mkfs.ext4
130.62
KB
-rwxr-xr-x
mkfs.fat
50.83
KB
-rwxr-xr-x
mkfs.minix
42.39
KB
-rwxr-xr-x
mkfs.msdos
50.83
KB
-rwxr-xr-x
mkfs.ntfs
70.38
KB
-rwxr-xr-x
mkfs.vfat
50.83
KB
-rwxr-xr-x
mkfs.xfs
382.77
KB
-rwxr-xr-x
mkhomedir_helper
22.17
KB
-rwxr-xr-x
mkinitramfs
12.16
KB
-rwxr-xr-x
mklost+found
14.3
KB
-rwxr-xr-x
mkntfs
70.38
KB
-rwxr-xr-x
mksmbpasswd
228
B
-rwxr-xr-x
mkswap
46.38
KB
-rwxr-xr-x
modinfo
166.36
KB
-rwxr-xr-x
modprobe
166.36
KB
-rwxr-xr-x
mount.fuse
18.3
KB
-rwxr-xr-x
mount.fuse3
18.3
KB
-rwxr-xr-x
mount.lowntfs-3g
114.98
KB
-rwxr-xr-x
mount.ntfs
159.01
KB
-rwxr-xr-x
mount.ntfs-3g
159.01
KB
-rwxr-xr-x
mpathpersist
31.05
KB
-rwxr-xr-x
multipath
34.15
KB
-rwxr-xr-x
multipathd
134.26
KB
-rwxr-xr-x
mysqld
24.33
MB
-rwxr-xr-x
nameif
14.48
KB
-rwxr-xr-x
needrestart
38.71
KB
-rwxr-xr-x
netplan
798
B
-rwxr-xr-x
newusers
74.73
KB
-rwxr-xr-x
nfnl_osf
18.3
KB
-rwxr-xr-x
nft
26.23
KB
-rwxr-xr-x
nginx
1.18
MB
-rwxr-xr-x
nmbd
262.33
KB
-rwxr-xr-x
nologin
14.3
KB
-rwxr-xr-x
ntfsclone
50.38
KB
-rwxr-xr-x
ntfscp
34.38
KB
-rwxr-xr-x
ntfslabel
22.38
KB
-rwxr-xr-x
ntfsresize
62.39
KB
-rwxr-xr-x
ntfsundelete
50.38
KB
-rwxr-xr-x
ntp-keygen
81.84
KB
-rwxr-xr-x
ntp-wait
3.12
KB
-rwxr-xr-x
ntpd
859.07
KB
-rwxr-xr-x
ntpdate
83.27
KB
-rwxr-xr-x
ntpdate-debian
534
B
-rwxr-xr-x
ntptime
22.26
KB
-rwxr-xr-x
oddjobd
78.35
KB
-rwxr-xr-x
on_ac_power
2.18
KB
-rwxr-xr-x
overlayroot-chroot
2.45
KB
-rwxr-xr-x
ownership
14.45
KB
-rwxr-xr-x
pam-auth-update
20.5
KB
-rwxr-xr-x
pam_extrausers_chkpwd
22.15
KB
-rwxr-sr-x
pam_extrausers_update
30.15
KB
-rwxr-xr-x
pam_getenv
2.82
KB
-rwxr-xr-x
pam_timestamp_check
14.15
KB
-rwxr-xr-x
paperconfig
4.07
KB
-rwxr-xr-x
parted
86.4
KB
-rwxr-xr-x
partprobe
14.38
KB
-rwxr-xr-x
pdata_tools
1.33
MB
-rwxr-xr-x
pg_updatedicts
4.26
KB
-rwxr-xr-x
phpdismod
7.11
KB
-rwxr-xr-x
phpenmod
7.11
KB
-rwxr-xr-x
phpquery
6.24
KB
-rwxr-xr-x
pivot_root
14.38
KB
-rwxr-xr-x
plipconfig
14.3
KB
-rwxr-xr-x
plocate-build
46.45
KB
-rwxr-xr-x
plymouthd
150.55
KB
-rwxr-xr-x
policyvers
14.3
KB
-rwxr-xr-x
postfix-nochroot
2.47
KB
-rwxr-xr-x
poweroff
1.06
MB
-rwxr-xr-x
pvchange
2.89
MB
-rwxr-xr-x
pvck
2.89
MB
-rwxr-xr-x
pvcreate
2.89
MB
-rwxr-xr-x
pvdisplay
2.89
MB
-rwxr-xr-x
pvmove
2.89
MB
-rwxr-xr-x
pvremove
2.89
MB
-rwxr-xr-x
pvresize
2.89
MB
-rwxr-xr-x
pvs
2.89
MB
-rwxr-xr-x
pvscan
2.89
MB
-rwxr-xr-x
pwck
50.13
KB
-rwxr-xr-x
pwconv
46.01
KB
-rwxr-xr-x
pwunconv
42.01
KB
-rwxr-xr-x
rarp
32.33
KB
-rwxr-xr-x
readprofile
22.41
KB
-rwxr-xr-x
realm
94.58
KB
-rwxr-xr-x
reboot
1.06
MB
-rwxr-xr-x
remove-shell
1.07
KB
-rwxr-xr-x
resize2fs
66.3
KB
-rwxr-xr-x
restorecon
22.3
KB
-rwxr-xr-x
restorecon_xattr
14.3
KB
-rwxr-xr-x
rmmod
166.36
KB
-rwxr-xr-x
rmt
58.57
KB
-rwxr-xr-x
rmt-tar
58.57
KB
-rwxr-xr-x
route
64.27
KB
-rwxr-xr-x
rsyslogd
767.19
KB
-rwxr-xr-x
rtacct
28.31
KB
-rwxr-xr-x
rtcwake
34.38
KB
-rwxr-xr-x
rtmon
90.39
KB
-rwxr-xr-x
runlevel
1.06
MB
-rwxr-xr-x
runuser
54.38
KB
-rwxr-xr-x
samba
42.33
KB
-rwxr-xr-x
samba-gpupdate
4.75
KB
-rwxr-xr-x
samba_dnsupdate
32.23
KB
-rwxr-xr-x
samba_downgrade_db
4.07
KB
-rwxr-xr-x
samba_kcc
11.9
KB
-rwxr-xr-x
samba_spnupdate
7.88
KB
-rwxr-xr-x
samba_upgradedns
21.65
KB
-rwxr-xr-x
sefcontext_compile
34.4
KB
-rwxr-xr-x
selabel_digest
14.3
KB
-rwxr-xr-x
selabel_get_digests_all_partia...
14.3
KB
-rwxr-xr-x
selabel_lookup
14.3
KB
-rwxr-xr-x
selabel_lookup_best_match
14.3
KB
-rwxr-xr-x
selabel_partial_match
14.3
KB
-rwxr-xr-x
selinux-activate
1.48
KB
-rwxr-xr-x
selinux-config-enforcing
570
B
-rwxr-xr-x
selinux-policy-upgrade
544
B
-rwxr-xr-x
selinux_check_access
14.3
KB
-rwxr-xr-x
selinux_check_securetty_contex...
14.3
KB
-rwxr-xr-x
selinuxenabled
14.3
KB
-rwxr-xr-x
selinuxexeccon
14.3
KB
-rwxr-xr-x
semanage
40.61
KB
-rwxr-xr-x
semodule
27.03
KB
-rwxr-xr-x
service
8.88
KB
-rwxr-xr-x
sestatus
22.3
KB
-rwxr-xr-x
setcap
14.3
KB
-rwxr-xr-x
setenforce
14.3
KB
-rwxr-xr-x
setfilecon
14.3
KB
-rwxr-xr-x
setfiles
22.3
KB
-rwxr-xr-x
setsebool
18.3
KB
-rwxr-xr-x
setvesablank
14.23
KB
-rwxr-xr-x
setvtrgb
14.29
KB
-rwxr-xr-x
sfdisk
102.38
KB
-rwxr-xr-x
sgdisk
162.48
KB
-rwxr-xr-x
shadowconfig
885
B
-rwxr-xr-x
shutdown
1.06
MB
-rwxr-xr-x
slattach
36.08
KB
-rwxr-xr-x
smbd
106.38
KB
-rwxr-xr-x
split-logfile
2.36
KB
-rwxr-xr-x
sshd
899.7
KB
-rwxr-xr-x
sss_cache
62.41
KB
-rwxr-xr-x
sss_debuglevel
120
B
-rwxr-xr-x
sss_obfuscate
3.76
KB
-rwxr-xr-x
sss_override
70.95
KB
-rwxr-xr-x
sss_seed
50.41
KB
-rwxr-xr-x
sssctl
94.41
KB
-rwxr-xr-x
sssd
78.73
KB
-rwxr-xr-x
start-stop-daemon
47.35
KB
-rwxr-xr-x
sudo_logsrvd
200.1
KB
-rwxr-xr-x
sudo_sendlog
107.34
KB
-rwxr-xr-x
sulogin
42.38
KB
-rwxr-xr-x
swaplabel
18.38
KB
-rwxr-xr-x
swapoff
22.38
KB
-rwxr-xr-x
swapon
42.38
KB
-rwxr-xr-x
switch_root
22.38
KB
-rwxr-xr-x
sysctl
30.23
KB
-rwxr-xr-x
tarcat
936
B
-rwxr-xr-x
tc
614.08
KB
-rwxr-xr-x
telinit
1.06
MB
-rwxr-xr-x
thermald
534.6
KB
-rwxr-xr-x
thin_check
1.33
MB
-rwxr-xr-x
thin_delta
1.33
MB
-rwxr-xr-x
thin_dump
1.33
MB
-rwxr-xr-x
thin_ls
1.33
MB
-rwxr-xr-x
thin_metadata_size
1.33
MB
-rwxr-xr-x
thin_repair
1.33
MB
-rwxr-xr-x
thin_restore
1.33
MB
-rwxr-xr-x
thin_rmap
1.33
MB
-rwxr-xr-x
thin_trim
1.33
MB
-rwxr-xr-x
tipc
90.44
KB
-rwxr-xr-x
togglesebool
14.3
KB
-rwxr-xr-x
tune2fs
102.55
KB
-rwxr-xr-x
tzconfig
106
B
-rwxr-xr-x
u-d-c-print-pci-ids
517
B
-rwxr-xr-x
ufw
4.82
KB
-rwxr-xr-x
umount.udisks2
14.3
KB
-rwxr-xr-x
unix_chkpwd
26.15
KB
-rwxr-sr-x
unix_update
30.15
KB
-rwxr-xr-x
update-ca-certificates
5.29
KB
-rwxr-xr-x
update-cracklib
1.15
KB
-rwxr-xr-x
update-grub
64
B
-rwxr-xr-x
update-grub-gfxpayload
301
B
-rwxr-xr-x
update-grub2
64
B
-rwxr-xr-x
update-gsfontmap
470
B
-rwxr-xr-x
update-icon-caches
596
B
-rwxr-xr-x
update-info-dir
1.66
KB
-rwxr-xr-x
update-initramfs
6.74
KB
-rwxr-xr-x
update-locale
2.99
KB
-rwxr-xr-x
update-mime
9.39
KB
-rwxr-xr-x
update-passwd
34.56
KB
-rwxr-xr-x
update-pciids
1.71
KB
-rwxr-xr-x
update-rc.d
16.92
KB
-rwxr-xr-x
update-shells
3.72
KB
-rwxr-xr-x
updatedb.plocate
98.54
KB
-rwxr-xr-x
upgrade-from-grub-legacy
1.56
KB
-rwxr-xr-x
usb_modeswitch
59.66
KB
-rwxr-xr-x
usb_modeswitch_dispatcher
26.78
KB
-rwxr-xr-x
usbmuxd
86.6
KB
-rwxr-xr-x
useradd
127.66
KB
-rwxr-xr-x
userdel
86.85
KB
-rwxr-xr-x
usermod
123.46
KB
-rwxr-xr-x
uuidd
30.85
KB
-rwxr-xr-x
validatetrans
14.3
KB
-rwxr-xr-x
validlocale
1.73
KB
-rwxr-xr-x
vcstime
14.15
KB
-rwxr-xr-x
vdpa
30.56
KB
-rwxr-xr-x
veritysetup
43.76
KB
-rwxr-xr-x
vgcfgbackup
2.89
MB
-rwxr-xr-x
vgcfgrestore
2.89
MB
-rwxr-xr-x
vgchange
2.89
MB
-rwxr-xr-x
vgck
2.89
MB
-rwxr-xr-x
vgconvert
2.89
MB
-rwxr-xr-x
vgcreate
2.89
MB
-rwxr-xr-x
vgdisplay
2.89
MB
-rwxr-xr-x
vgexport
2.89
MB
-rwxr-xr-x
vgextend
2.89
MB
-rwxr-xr-x
vgimport
2.89
MB
-rwxr-xr-x
vgimportclone
2.89
MB
-rwxr-xr-x
vgmerge
2.89
MB
-rwxr-xr-x
vgmknodes
2.89
MB
-rwxr-xr-x
vgreduce
2.89
MB
-rwxr-xr-x
vgremove
2.89
MB
-rwxr-xr-x
vgrename
2.89
MB
-rwxr-xr-x
vgs
2.89
MB
-rwxr-xr-x
vgscan
2.89
MB
-rwxr-xr-x
vgsplit
2.89
MB
-rwxr-xr-x
vigr
56.53
KB
-rwxr-xr-x
vipw
56.53
KB
-rwxr-xr-x
visudo
219.79
KB
-rwxr-xr-x
vpddecode
14.58
KB
-rwxr-xr-x
vsftpd
156.48
KB
-rwxr-xr-x
winbindd
1.06
MB
-rwxr-xr-x
wipefs
38.38
KB
-rwxr-xr-x
xfs_admin
1.37
KB
-rwxr-xr-x
xfs_bmap
695
B
-rwxr-xr-x
xfs_copy
82.47
KB
-rwxr-xr-x
xfs_db
652.42
KB
-rwxr-xr-x
xfs_estimate
14.16
KB
-rwxr-xr-x
xfs_freeze
800
B
-rwxr-xr-x
xfs_fsr
42.17
KB
-rwxr-xr-x
xfs_growfs
38.27
KB
-rwxr-xr-x
xfs_info
1.26
KB
-rwxr-xr-x
xfs_io
199.55
KB
-rwxr-xr-x
xfs_logprint
78.32
KB
-rwxr-xr-x
xfs_mdrestore
26.16
KB
-rwxr-xr-x
xfs_metadump
782
B
-rwxr-xr-x
xfs_mkfile
1.02
KB
-rwxr-xr-x
xfs_ncheck
685
B
-rwxr-xr-x
xfs_quota
90.16
KB
-rwxr-xr-x
xfs_repair
599.37
KB
-rwxr-xr-x
xfs_rtcp
18.14
KB
-rwxr-xr-x
xfs_scrub
106.25
KB
-rwxr-xr-x
xfs_scrub_all
5.87
KB
-rwxr-xr-x
xfs_spaceman
42.29
KB
-rwxr-xr-x
xtables-legacy-multi
96.95
KB
-rwxr-xr-x
xtables-monitor
219.04
KB
-rwxr-xr-x
xtables-nft-multi
219.04
KB
-rwxr-xr-x
zerofree
14.15
KB
-rwxr-xr-x
zic
62.32
KB
-rwxr-xr-x
zramctl
54.52
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : samba_upgradedns
#!/usr/bin/python3 # # Unix SMB/CIFS implementation. # Copyright (C) Amitay Isaacs <amitay@gmail.com> 2012 # # Upgrade DNS provision from BIND9_FLATFILE to BIND9_DLZ or SAMBA_INTERNAL # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import sys import os import errno import optparse import logging import grp from base64 import b64encode import shlex import ldb import samba from samba import param from samba.auth import system_session from samba.ndr import ( ndr_pack, ndr_unpack ) import samba.getopt as options from samba.upgradehelpers import ( get_paths, get_ldbs ) from samba.dsdb import DS_DOMAIN_FUNCTION_2003 from samba.provision import ( find_provision_key_parameters, interface_ips_v4, interface_ips_v6 ) from samba.provision.common import ( setup_path, setup_add_ldif, FILL_FULL) from samba.provision.sambadns import ( ARecord, AAAARecord, CNAMERecord, NSRecord, SOARecord, SRVRecord, TXTRecord, get_dnsadmins_sid, add_dns_accounts, create_dns_partitions, fill_dns_data_partitions, create_dns_dir, secretsdb_setup_dns, create_dns_dir_keytab_link, create_samdb_copy, create_named_conf, create_named_txt ) from samba.dcerpc import security import dns.zone, dns.rdatatype __docformat__ = 'restructuredText' def find_bind_gid(): """Find system group id for bind9 """ for name in ["bind", "named"]: try: return grp.getgrnam(name)[2] except KeyError: pass return None def convert_dns_rdata(rdata, serial=1): """Convert resource records in dnsRecord format """ if rdata.rdtype == dns.rdatatype.A: rec = ARecord(rdata.address, serial=serial) elif rdata.rdtype == dns.rdatatype.AAAA: rec = AAAARecord(rdata.address, serial=serial) elif rdata.rdtype == dns.rdatatype.CNAME: rec = CNAMERecord(rdata.target.to_text(), serial=serial) elif rdata.rdtype == dns.rdatatype.NS: rec = NSRecord(rdata.target.to_text(), serial=serial) elif rdata.rdtype == dns.rdatatype.SRV: rec = SRVRecord(rdata.target.to_text(), int(rdata.port), priority=int(rdata.priority), weight=int(rdata.weight), serial=serial) elif rdata.rdtype == dns.rdatatype.TXT: slist = shlex.split(rdata.to_text()) rec = TXTRecord(slist, serial=serial) elif rdata.rdtype == dns.rdatatype.SOA: rec = SOARecord(rdata.mname.to_text(), rdata.rname.to_text(), serial=int(rdata.serial), refresh=int(rdata.refresh), retry=int(rdata.retry), expire=int(rdata.expire), minimum=int(rdata.minimum)) else: rec = None return rec def import_zone_data(samdb, logger, zone, serial, domaindn, forestdn, dnsdomain, dnsforest): """Insert zone data in DNS partitions """ labels = dnsdomain.split('.') labels.append('') domain_root = dns.name.Name(labels) domain_prefix = "DC=%s,CN=MicrosoftDNS,DC=DomainDnsZones,%s" % (dnsdomain, domaindn) tmp = "_msdcs.%s" % dnsforest labels = tmp.split('.') labels.append('') forest_root = dns.name.Name(labels) dnsmsdcs = "_msdcs.%s" % dnsforest forest_prefix = "DC=%s,CN=MicrosoftDNS,DC=ForestDnsZones,%s" % (dnsmsdcs, forestdn) # Extract @ record at_record = zone.get_node(domain_root) zone.delete_node(domain_root) # SOA record rdset = at_record.get_rdataset(dns.rdataclass.IN, dns.rdatatype.SOA) soa_rec = ndr_pack(convert_dns_rdata(rdset[0])) at_record.delete_rdataset(dns.rdataclass.IN, dns.rdatatype.SOA) # NS record rdset = at_record.get_rdataset(dns.rdataclass.IN, dns.rdatatype.NS) ns_rec = ndr_pack(convert_dns_rdata(rdset[0])) at_record.delete_rdataset(dns.rdataclass.IN, dns.rdatatype.NS) # A/AAAA records ip_recs = [] for rdset in at_record: for r in rdset: rec = convert_dns_rdata(r) ip_recs.append(ndr_pack(rec)) # Add @ record for domain dns_rec = [soa_rec, ns_rec] + ip_recs msg = ldb.Message(ldb.Dn(samdb, 'DC=@,%s' % domain_prefix)) msg["objectClass"] = ["top", "dnsNode"] msg["dnsRecord"] = ldb.MessageElement(dns_rec, ldb.FLAG_MOD_ADD, "dnsRecord") try: samdb.add(msg) except Exception: logger.error("Failed to add @ record for domain") raise logger.debug("Added @ record for domain") # Add @ record for forest dns_rec = [soa_rec, ns_rec] msg = ldb.Message(ldb.Dn(samdb, 'DC=@,%s' % forest_prefix)) msg["objectClass"] = ["top", "dnsNode"] msg["dnsRecord"] = ldb.MessageElement(dns_rec, ldb.FLAG_MOD_ADD, "dnsRecord") try: samdb.add(msg) except Exception: logger.error("Failed to add @ record for forest") raise logger.debug("Added @ record for forest") # Add remaining records in domain and forest for node in zone.nodes: name = node.relativize(forest_root).to_text() if name == node.to_text(): name = node.relativize(domain_root).to_text() dn = "DC=%s,%s" % (name, domain_prefix) fqdn = "%s.%s" % (name, dnsdomain) else: dn = "DC=%s,%s" % (name, forest_prefix) fqdn = "%s.%s" % (name, dnsmsdcs) dns_rec = [] for rdataset in zone.nodes[node]: for rdata in rdataset: rec = convert_dns_rdata(rdata, serial) if not rec: logger.warn("Unsupported record type (%s) for %s, ignoring" % dns.rdatatype.to_text(rdata.rdatatype), name) else: dns_rec.append(ndr_pack(rec)) msg = ldb.Message(ldb.Dn(samdb, dn)) msg["objectClass"] = ["top", "dnsNode"] msg["dnsRecord"] = ldb.MessageElement(dns_rec, ldb.FLAG_MOD_ADD, "dnsRecord") try: samdb.add(msg) except Exception: logger.error("Failed to add DNS record %s" % (fqdn)) raise logger.debug("Added DNS record %s" % (fqdn)) def cleanup_remove_file(file_path): try: os.remove(file_path) except OSError as e: if e.errno not in [errno.EEXIST, errno.ENOENT]: pass else: logger.debug("Could not remove %s: %s" % (file_path, e.strerror)) def cleanup_remove_dir(dir_path): try: for root, dirs, files in os.walk(dir_path, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) os.rmdir(dir_path) except OSError as e: if e.errno not in [errno.EEXIST, errno.ENOENT]: pass else: logger.debug("Could not delete dir %s: %s" % (dir_path, e.strerror)) def cleanup_obsolete_dns_files(paths): cleanup_remove_file(os.path.join(paths.private_dir, "named.conf")) cleanup_remove_file(os.path.join(paths.private_dir, "named.conf.update")) cleanup_remove_file(os.path.join(paths.private_dir, "named.txt")) cleanup_remove_dir(os.path.join(paths.private_dir, "dns")) # dnsprovision creates application partitions for AD based DNS mainly if the existing # provision was created using earlier snapshots of samba4 which did not have support # for DNS partitions if __name__ == '__main__': # Setup command line parser parser = optparse.OptionParser("upgradedns [options]") sambaopts = options.SambaOptions(parser) credopts = options.CredentialsOptions(parser) parser.add_option_group(options.VersionOptions(parser)) parser.add_option_group(sambaopts) parser.add_option_group(credopts) parser.add_option("--dns-backend", type="choice", metavar="<BIND9_DLZ|SAMBA_INTERNAL>", choices=["SAMBA_INTERNAL", "BIND9_DLZ"], default="SAMBA_INTERNAL", help="The DNS server backend, default SAMBA_INTERNAL") parser.add_option("--migrate", type="choice", metavar="<yes|no>", choices=["yes","no"], default="yes", help="Migrate existing zone data, default yes") parser.add_option("--verbose", help="Be verbose", action="store_true") opts = parser.parse_args()[0] if opts.dns_backend is None: opts.dns_backend = 'SAMBA_INTERNAL' if opts.migrate: autofill = False else: autofill = True # Set up logger logger = logging.getLogger("upgradedns") logger.addHandler(logging.StreamHandler(sys.stdout)) logger.setLevel(logging.INFO) if opts.verbose: logger.setLevel(logging.DEBUG) lp = sambaopts.get_loadparm() lp.load(lp.configfile) creds = credopts.get_credentials(lp) logger.info("Reading domain information") paths = get_paths(param, smbconf=lp.configfile) paths.bind_gid = find_bind_gid() ldbs = get_ldbs(paths, creds, system_session(), lp) names = find_provision_key_parameters(ldbs.sam, ldbs.secrets, ldbs.idmap, paths, lp.configfile, lp) if names.domainlevel < DS_DOMAIN_FUNCTION_2003: logger.error("Cannot create AD based DNS for OS level < 2003") sys.exit(1) domaindn = names.domaindn forestdn = names.rootdn dnsdomain = names.dnsdomain.lower() dnsforest = dnsdomain site = names.sitename hostname = names.hostname dnsname = '%s.%s' % (hostname, dnsdomain) domainsid = names.domainsid domainguid = names.domainguid ntdsguid = names.ntdsguid # Check for DNS accounts and create them if required try: msg = ldbs.sam.search(base=domaindn, scope=ldb.SCOPE_DEFAULT, expression='(sAMAccountName=DnsAdmins)', attrs=['objectSid']) dnsadmins_sid = ndr_unpack(security.dom_sid, msg[0]['objectSid'][0]) except IndexError: logger.info("Adding DNS accounts") add_dns_accounts(ldbs.sam, domaindn) dnsadmins_sid = get_dnsadmins_sid(ldbs.sam, domaindn) else: logger.info("DNS accounts already exist") # Import dns records from zone file if os.path.exists(paths.dns): logger.info("Reading records from zone file %s" % paths.dns) try: zone = dns.zone.from_file(paths.dns, relativize=False) rrset = zone.get_rdataset("%s." % dnsdomain, dns.rdatatype.SOA) serial = int(rrset[0].serial) except Exception as e: logger.warn("Error parsing DNS data from '%s' (%s)" % (paths.dns, str(e))) autofill = True else: logger.info("No zone file %s (normal)" % paths.dns) autofill = True # Create DNS partitions if missing and fill DNS information try: expression = '(|(dnsRoot=DomainDnsZones.%s)(dnsRoot=ForestDnsZones.%s))' % \ (dnsdomain, dnsforest) msg = ldbs.sam.search(base=names.configdn, scope=ldb.SCOPE_DEFAULT, expression=expression, attrs=['nCName']) ncname = msg[0]['nCName'][0] except IndexError: logger.info("Creating DNS partitions") logger.info("Looking up IPv4 addresses") hostip = interface_ips_v4(lp) try: hostip.remove('127.0.0.1') except ValueError: pass if not hostip: logger.error("No IPv4 addresses found") sys.exit(1) else: hostip = hostip[0] logger.debug("IPv4 addresses: %s" % hostip) logger.info("Looking up IPv6 addresses") hostip6 = interface_ips_v6(lp) if not hostip6: hostip6 = None else: hostip6 = hostip6[0] logger.debug("IPv6 addresses: %s" % hostip6) create_dns_partitions(ldbs.sam, domainsid, names, domaindn, forestdn, dnsadmins_sid, FILL_FULL) logger.info("Populating DNS partitions") if autofill: logger.warn("DNS records will be automatically created") fill_dns_data_partitions(ldbs.sam, domainsid, site, domaindn, forestdn, dnsdomain, dnsforest, hostname, hostip, hostip6, domainguid, ntdsguid, dnsadmins_sid, autofill=autofill) if not autofill: logger.info("Importing records from zone file") import_zone_data(ldbs.sam, logger, zone, serial, domaindn, forestdn, dnsdomain, dnsforest) else: logger.info("DNS partitions already exist") # Mark that we are hosting DNS partitions try: dns_nclist = [ 'DC=DomainDnsZones,%s' % domaindn, 'DC=ForestDnsZones,%s' % forestdn ] msgs = ldbs.sam.search(base=names.serverdn, scope=ldb.SCOPE_DEFAULT, expression='(objectclass=nTDSDSa)', attrs=['hasPartialReplicaNCs', 'msDS-hasMasterNCs']) msg = msgs[0] master_nclist = [] ncs = msg.get("msDS-hasMasterNCs") if ncs: for nc in ncs: master_nclist.append(str(nc)) partial_nclist = [] ncs = msg.get("hasPartialReplicaNCs") if ncs: for nc in ncs: partial_nclist.append(str(nc)) modified_master = False modified_partial = False for nc in dns_nclist: if nc not in master_nclist: master_nclist.append(nc) modified_master = True if nc in partial_nclist: partial_nclist.remove(nc) modified_partial = True if modified_master or modified_partial: logger.debug("Updating msDS-hasMasterNCs and hasPartialReplicaNCs attributes") m = ldb.Message() m.dn = msg.dn if modified_master: m["msDS-hasMasterNCs"] = ldb.MessageElement(master_nclist, ldb.FLAG_MOD_REPLACE, "msDS-hasMasterNCs") if modified_partial: if partial_nclist: m["hasPartialReplicaNCs"] = ldb.MessageElement(partial_nclist, ldb.FLAG_MOD_REPLACE, "hasPartialReplicaNCs") else: m["hasPartialReplicaNCs"] = ldb.MessageElement(ncs, ldb.FLAG_MOD_DELETE, "hasPartialReplicaNCs") ldbs.sam.modify(m) except Exception: raise # Special stuff for DLZ backend if opts.dns_backend == "BIND9_DLZ": config_migration = False if (paths.private_dir != paths.binddns_dir and os.path.isfile(os.path.join(paths.private_dir, "named.conf"))): config_migration = True # Check if dns-HOSTNAME account exists and create it if required secrets_msgs = ldbs.secrets.search(expression='(samAccountName=dns-%s)' % hostname, attrs=['secret']) msg = ldbs.sam.search(base=domaindn, scope=ldb.SCOPE_DEFAULT, expression='(sAMAccountName=dns-%s)' % (hostname), attrs=[]) if len(secrets_msgs) == 0 or len(msg) == 0: logger.info("Adding dns-%s account" % hostname) if len(secrets_msgs) == 1: dn = secrets_msgs[0].dn ldbs.secrets.delete(dn) if len(msg) == 1: dn = msg[0].dn ldbs.sam.delete(dn) dnspass = samba.generate_random_password(128, 255) setup_add_ldif(ldbs.sam, setup_path("provision_dns_add_samba.ldif"), { "DNSDOMAIN": dnsdomain, "DOMAINDN": domaindn, "DNSPASS_B64": b64encode(dnspass.encode('utf-16-le')).decode('utf8'), "HOSTNAME" : hostname, "DNSNAME" : dnsname } ) res = ldbs.sam.search(base=domaindn, scope=ldb.SCOPE_DEFAULT, expression='(sAMAccountName=dns-%s)' % (hostname), attrs=["msDS-KeyVersionNumber"]) if "msDS-KeyVersionNumber" in res[0]: dns_key_version_number = int(res[0]["msDS-KeyVersionNumber"][0]) else: dns_key_version_number = None secretsdb_setup_dns(ldbs.secrets, names, paths.private_dir, paths.binddns_dir, realm=names.realm, dnsdomain=names.dnsdomain, dns_keytab_path=paths.dns_keytab, dnspass=dnspass, key_version_number=dns_key_version_number) else: logger.info("dns-%s account already exists" % hostname) if not os.path.exists(paths.binddns_dir): # This directory won't exist if we're restoring from an offline backup. os.mkdir(paths.binddns_dir, 0o770) create_dns_dir_keytab_link(logger, paths) # This forces a re-creation of dns directory and all the files within # It's an overkill, but it's easier to re-create a samdb copy, rather # than trying to fix a broken copy. create_dns_dir(logger, paths) # Setup a copy of SAM for BIND9 create_samdb_copy(ldbs.sam, logger, paths, names, domainsid, domainguid) create_named_conf(paths, names.realm, dnsdomain, opts.dns_backend, logger) create_named_txt(paths.namedtxt, names.realm, dnsdomain, dnsname, paths.binddns_dir, paths.dns_keytab) cleanup_obsolete_dns_files(paths) if config_migration: logger.info("ATTENTION: The BIND configuration and keytab has been moved to: %s", paths.binddns_dir) logger.info(" Please update your BIND configuration accordingly.") else: logger.info("See %s for an example configuration include file for BIND", paths.namedconf) logger.info("and %s for further documentation required for secure DNS " "updates", paths.namedtxt) elif opts.dns_backend == "SAMBA_INTERNAL": # Make sure to remove everything from the bind-dns directory to avoid # possible security issues with the named group having write access # to all AD partions cleanup_remove_file(os.path.join(paths.binddns_dir, "dns.keytab")) cleanup_remove_file(os.path.join(paths.binddns_dir, "named.conf")) cleanup_remove_file(os.path.join(paths.binddns_dir, "named.conf.update")) cleanup_remove_file(os.path.join(paths.binddns_dir, "named.txt")) cleanup_remove_dir(os.path.dirname(paths.dns)) try: os.chmod(paths.private_dir, 0o700) os.chown(paths.private_dir, -1, 0) except: logger.warn("Failed to restore owner and permissions for %s", (paths.private_dir)) # Check if dns-HOSTNAME account exists and delete it if required try: dn_str = 'samAccountName=dns-%s,CN=Principals' % hostname msg = ldbs.secrets.search(expression='(dn=%s)' % dn_str, attrs=[]) dn = msg[0].dn except IndexError: dn = None if dn is not None: try: ldbs.secrets.delete(dn) except Exception: logger.info("Failed to delete %s from secrets.ldb" % dn) try: msg = ldbs.sam.search(base=domaindn, scope=ldb.SCOPE_DEFAULT, expression='(sAMAccountName=dns-%s)' % (hostname), attrs=[]) dn = msg[0].dn except IndexError: dn = None if dn is not None: try: ldbs.sam.delete(dn) except Exception: logger.info("Failed to delete %s from sam.ldb" % dn) logger.info("Finished upgrading DNS") services = lp.get("server services") for service in services: if service == "dns": if opts.dns_backend.startswith("BIND"): logger.info("You have switched to using %s as your dns backend," " but still have the internal dns starting. Please" " make sure you add '-dns' to your server services" " line in your smb.conf." % opts.dns_backend) break else: if opts.dns_backend == "SAMBA_INTERNAL": logger.info("You have switched to using %s as your dns backend," " but you still have samba starting looking for a" " BIND backend. Please remove the -dns from your" " server services line." % opts.dns_backend)
Close