X7ROOT File Manager
Current Path:
/usr/sbin
usr
/
sbin
/
π
..
π
NetworkManager
(3.41 MB)
π
accessdb
(12.59 KB)
π
accton
(13.69 KB)
π
adcli
(179.27 KB)
π
addgnupghome
(3 KB)
π
addpart
(24.86 KB)
π
adduser
(148.17 KB)
π
agetty
(62.38 KB)
π
alternatives
(36.66 KB)
π
anacron
(40.99 KB)
π
apachectl
(4.52 KB)
π
applygnupgdefaults
(2.17 KB)
π
arp
(64.71 KB)
π
arpd
(109.52 KB)
π
arping
(28.74 KB)
π
atd
(32.63 KB)
π
atopacctd
(25.29 KB)
π
atrun
(67 B)
π
auditctl
(45.04 KB)
π
auditd
(151.73 KB)
π
augenrules
(4.04 KB)
π
aureport
(122.35 KB)
π
ausearch
(130.36 KB)
π
authconfig
(21.54 KB)
π
autrace
(16.54 KB)
π
avcstat
(16.4 KB)
π
badblocks
(32.59 KB)
π
biosdecode
(21.45 KB)
π
biosdevname
(46.16 KB)
π
blkdeactivate
(15.97 KB)
π
blkdiscard
(29.05 KB)
π
blkid
(98.66 KB)
π
blkmapd
(53.47 KB)
π
blkzone
(49.74 KB)
π
blockdev
(41.3 KB)
π
bpftool
(2.74 MB)
π
bridge
(158.25 KB)
π
build-locale-archive
(841.02 KB)
π
cache_check
(1.43 MB)
π
cache_dump
(1.43 MB)
π
cache_metadata_size
(1.43 MB)
π
cache_repair
(1.43 MB)
π
cache_restore
(1.43 MB)
π
cache_writeback
(1.43 MB)
π
capsh
(32.44 KB)
π
cfdisk
(98.4 KB)
π
chcpu
(28.84 KB)
π
chgpasswd
(69.69 KB)
π
chkconfig
(45.11 KB)
π
chpasswd
(61.42 KB)
π
chronyd
(375.66 KB)
π
chroot
(41.52 KB)
π
clock
(65.22 KB)
π
clockdiff
(20.43 KB)
π
consoletype
(11.85 KB)
π
convertquota
(78.68 KB)
π
cracklib-check
(13.05 KB)
π
cracklib-format
(251 B)
π
cracklib-packer
(13.05 KB)
π
cracklib-unpacker
(9.03 KB)
π
create-cracklib-dict
(990 B)
π
crond
(73.94 KB)
π
cryptsetup
(147.42 KB)
π
csf
(245.1 KB)
π
ctrlaltdel
(24.79 KB)
π
ctstat
(25.33 KB)
π
dcb
(155.04 KB)
π
ddns-confgen
(20.46 KB)
π
debugfs
(231.63 KB)
π
delpart
(24.86 KB)
π
depmod
(159.95 KB)
π
devlink
(215.87 KB)
π
dhclient
(453.68 KB)
π
dhclient-script
(32.86 KB)
π
dmeventd
(45.08 KB)
π
dmfilemapd
(24.55 KB)
π
dmidecode
(141.8 KB)
π
dmsetup
(158.64 KB)
π
dmstats
(158.64 KB)
π
dnssec-checkds
(936 B)
π
dnssec-coverage
(938 B)
π
dnssec-dsfromkey
(60.84 KB)
π
dnssec-importkey
(60.84 KB)
π
dnssec-keyfromlabel
(64.76 KB)
π
dnssec-keygen
(72.84 KB)
π
dnssec-keymgr
(934 B)
π
dnssec-revoke
(56.74 KB)
π
dnssec-settime
(60.84 KB)
π
dnssec-signzone
(117.2 KB)
π
dnssec-verify
(52.84 KB)
π
dosfsck
(65.13 KB)
π
dosfslabel
(61.1 KB)
π
dovecot
(137.48 KB)
π
dovecot_cpshutdown
(3.27 KB)
π
dpkg-fsys-usrunmess
(12.11 KB)
π
dump-acct
(29.15 KB)
π
dump-utmp
(25.02 KB)
π
dumpe2fs
(32.52 KB)
π
e2freefrag
(16.42 KB)
π
e2fsck
(328.52 KB)
π
e2image
(36.61 KB)
π
e2label
(110.63 KB)
π
e2mmpstatus
(32.52 KB)
π
e2undo
(20.38 KB)
π
e4crypt
(24.55 KB)
π
e4defrag
(28.49 KB)
π
ebtables
(220.8 KB)
π
ebtables-restore
(220.8 KB)
π
ebtables-save
(220.8 KB)
π
edquota
(91.24 KB)
π
era_check
(1.43 MB)
π
era_dump
(1.43 MB)
π
era_invalidate
(1.43 MB)
π
era_restore
(1.43 MB)
π
ether-wake
(73.99 KB)
π
ethtool
(557.79 KB)
π
exicyclog
(11.1 KB)
π
exigrep
(10.52 KB)
π
exim
(1.49 MB)
π
exim_checkaccess
(4.83 KB)
π
exim_dbmbuild
(23.23 KB)
π
exim_dumpdb
(38.02 KB)
π
exim_fixdb
(47.56 KB)
π
exim_lock
(26.59 KB)
π
exim_tidydb
(42.35 KB)
π
eximstats
(148.26 KB)
π
exinext
(7.14 KB)
π
exiqgrep
(5.66 KB)
π
exiqsumm
(5.32 KB)
π
exiwhat
(4.42 KB)
π
exportfs
(82.38 KB)
π
faillock
(20.52 KB)
π
fatlabel
(61.1 KB)
π
fcgistarter
(17.11 KB)
π
fdformat
(33.17 KB)
π
fdisk
(130.92 KB)
π
filefrag
(16.47 KB)
π
findfs
(12.37 KB)
π
firewalld
(6.92 KB)
π
fix-info-dir
(7.84 KB)
π
fixfiles
(10.48 KB)
π
fsadm
(24 KB)
π
fsck
(53.47 KB)
π
fsck.cramfs
(41.4 KB)
π
fsck.ext2
(328.52 KB)
π
fsck.ext3
(328.52 KB)
π
fsck.ext4
(328.52 KB)
π
fsck.fat
(65.13 KB)
π
fsck.minix
(98.74 KB)
π
fsck.msdos
(65.13 KB)
π
fsck.vfat
(65.13 KB)
π
fsck.xfs
(1.92 KB)
π
fsfreeze
(16.38 KB)
π
fstrim
(49.6 KB)
π
fuse2fs
(70.39 KB)
π
fuser
(38.14 KB)
π
g13-syshelp
(189.71 KB)
π
genhomedircon
(29.27 KB)
π
genhostid
(11.85 KB)
π
genl
(121.41 KB)
π
genrandom
(12.38 KB)
π
getcap
(12.34 KB)
π
getenforce
(7.84 KB)
π
getpcaps
(12.27 KB)
π
getsebool
(11.88 KB)
π
groupadd
(95.34 KB)
π
groupdel
(91.09 KB)
π
groupmems
(61.48 KB)
π
groupmod
(99.37 KB)
π
grpck
(61.48 KB)
π
grpconv
(57.26 KB)
π
grpunconv
(57.25 KB)
π
grub2-bios-setup
(1.16 MB)
π
grub2-get-kernel-settings
(2.68 KB)
π
grub2-install
(1.44 MB)
π
grub2-macbless
(1.14 MB)
π
grub2-mkconfig
(8.68 KB)
π
grub2-ofpathname
(242.26 KB)
π
grub2-probe
(1.16 MB)
π
grub2-reboot
(3.99 KB)
π
grub2-rpm-sort
(279.16 KB)
π
grub2-set-bootflag
(16.34 KB)
π
grub2-set-default
(3.45 KB)
π
grub2-set-password
(3.05 KB)
π
grub2-setpassword
(3.05 KB)
π
grub2-sparc64-setup
(1.16 MB)
π
grub2-switch-to-blscfg
(8.6 KB)
π
grubby
(260 B)
π
gss-server
(24.62 KB)
π
gssproxy
(132.08 KB)
π
halt
(218.45 KB)
π
hardlink
(17.09 KB)
π
hdparm
(131.91 KB)
π
htcacheclean
(44.36 KB)
π
httpd
(990.57 KB)
π
hwclock
(65.22 KB)
π
iconvconfig
(33.05 KB)
π
ifconfig
(80.86 KB)
π
ifdown
(2.07 KB)
π
ifenslave
(24.95 KB)
π
ifstat
(117.67 KB)
π
iftop
(75.42 KB)
π
ifup
(5.33 KB)
π
imunify-notifier
(9.82 MB)
π
init
(1.53 MB)
π
insmod
(159.95 KB)
π
install-info
(50.23 KB)
π
installkernel
(323 B)
π
intel_sdsi
(15.62 KB)
π
iotop
(511 B)
π
ip
(693.3 KB)
π
ip6tables
(220.8 KB)
π
ip6tables-apply
(6.89 KB)
π
ip6tables-restore
(220.8 KB)
π
ip6tables-restore-translate
(220.8 KB)
π
ip6tables-save
(220.8 KB)
π
ip6tables-translate
(220.8 KB)
π
ipmaddr
(21 KB)
π
iprconfig
(408.03 KB)
π
iprdbg
(137.57 KB)
π
iprdump
(129.3 KB)
π
iprinit
(125.28 KB)
π
iprsos
(2.18 KB)
π
iprupdate
(129.3 KB)
π
ipset
(9.01 KB)
π
iptables
(220.8 KB)
π
iptables-apply
(6.89 KB)
π
iptables-restore
(220.8 KB)
π
iptables-restore-translate
(220.8 KB)
π
iptables-save
(220.8 KB)
π
iptables-translate
(220.8 KB)
π
iptstate
(92.05 KB)
π
iptunnel
(25 KB)
π
irqbalance
(62.28 KB)
π
irqbalance-ui
(41.29 KB)
π
isc-hmac-fixup
(11.85 KB)
π
iscsi-iname
(16.42 KB)
π
iscsiadm
(406.38 KB)
π
iscsid
(419.23 KB)
π
iscsistart
(374.54 KB)
π
iscsiuio
(183.51 KB)
π
kexec
(194.98 KB)
π
key.dns_resolver
(24.52 KB)
π
kpartx
(49.05 KB)
π
kpatch
(16.59 KB)
π
lchage
(16.41 KB)
π
ldattach
(32.99 KB)
π
ldconfig
(986.02 KB)
π
ledctl
(101.16 KB)
π
ledmon
(101.11 KB)
π
lfd
(382.45 KB)
π
lgroupadd
(11.88 KB)
π
lgroupdel
(11.88 KB)
π
lgroupmod
(19.88 KB)
π
lid
(16.27 KB)
π
lnewusers
(19.87 KB)
π
lnstat
(25.33 KB)
π
load_policy
(12.28 KB)
π
logrotate
(93.03 KB)
π
logsave
(16.41 KB)
π
losetup
(90.59 KB)
π
lpasswd
(20.35 KB)
π
lshw
(966.2 KB)
π
lsmod
(159.95 KB)
π
lspci
(94.85 KB)
π
luseradd
(19.88 KB)
π
luserdel
(15.88 KB)
π
lusermod
(19.88 KB)
π
lvchange
(2.61 MB)
π
lvconvert
(2.61 MB)
π
lvcreate
(2.61 MB)
π
lvdisplay
(2.61 MB)
π
lvextend
(2.61 MB)
π
lvm
(2.61 MB)
π
lvm_import_vdo
(23.14 KB)
π
lvmconfig
(2.61 MB)
π
lvmdevices
(2.61 MB)
π
lvmdiskscan
(2.61 MB)
π
lvmdump
(10.12 KB)
π
lvmpolld
(200.69 KB)
π
lvmsadc
(2.61 MB)
π
lvmsar
(2.61 MB)
π
lvreduce
(2.61 MB)
π
lvremove
(2.61 MB)
π
lvrename
(2.61 MB)
π
lvresize
(2.61 MB)
π
lvs
(2.61 MB)
π
lvscan
(2.61 MB)
π
lwresd
(840.86 KB)
π
makedumpfile
(425.19 KB)
π
mariadbd
(24.3 MB)
π
matchpathcon
(12.37 KB)
π
mcelog
(206.3 KB)
π
mdadm
(620.63 KB)
π
mdmon
(375.48 KB)
π
mii-diag
(25.4 KB)
π
mii-tool
(21.03 KB)
π
mkdict
(251 B)
π
mkdosfs
(39.07 KB)
π
mkdumprd
(12.68 KB)
π
mke2fs
(138.45 KB)
π
mkfadumprd
(2.23 KB)
π
mkfs
(16.47 KB)
π
mkfs.cramfs
(41.26 KB)
π
mkfs.ext2
(138.45 KB)
π
mkfs.ext3
(138.45 KB)
π
mkfs.ext4
(138.45 KB)
π
mkfs.fat
(39.07 KB)
π
mkfs.minix
(86.55 KB)
π
mkfs.msdos
(39.07 KB)
π
mkfs.vfat
(39.07 KB)
π
mkfs.xfs
(475.98 KB)
π
mkhomedir_helper
(24.43 KB)
π
mklost+found
(11.86 KB)
π
mksquashfs
(186.83 KB)
π
mkswap
(86.47 KB)
π
modinfo
(159.95 KB)
π
modprobe
(159.95 KB)
π
modsec-sdbm-util
(25.83 KB)
π
mount.nfs
(197.24 KB)
π
mount.nfs4
(197.24 KB)
π
mountstats
(42.22 KB)
π
mpathconf
(16.17 KB)
π
mpathpersist
(29.34 KB)
π
mtr
(110.92 KB)
π
mtr-packet
(58.3 KB)
π
multipath
(32.61 KB)
π
multipathd
(134.76 KB)
π
mysqld
(24.3 MB)
π
named
(840.86 KB)
π
named-checkconf
(36.77 KB)
π
named-checkzone
(36.63 KB)
π
named-compilezone
(36.63 KB)
π
named-journalprint
(11.85 KB)
π
nameif
(16.98 KB)
π
newusers
(107.23 KB)
π
nfsconf
(37.48 KB)
π
nfsconvert
(13.03 KB)
π
nfsdcld
(65.87 KB)
π
nfsdclddb
(10 KB)
π
nfsdclnts
(9.02 KB)
π
nfsdcltrack
(49.78 KB)
π
nfsidmap
(45.36 KB)
π
nfsiostat
(23.36 KB)
π
nfsref
(65.8 KB)
π
nfsstat
(35.52 KB)
π
nft
(24.41 KB)
π
nginx
(1.85 MB)
π
nginx-debug
(1.98 MB)
π
nologin
(11.87 KB)
π
nrpe
(76.13 KB)
π
nscd
(160.68 KB)
π
nsec3hash
(12.29 KB)
π
nstat
(113.57 KB)
π
nvme
(721.45 KB)
π
oddjobd
(77.63 KB)
π
ownership
(12.4 KB)
π
packer
(13.05 KB)
π
pam_console_apply
(45.2 KB)
π
pam_timestamp_check
(11.87 KB)
π
paperconfig
(4.07 KB)
π
parted
(85.6 KB)
π
partprobe
(16.39 KB)
π
partx
(94.5 KB)
π
pdata_tools
(1.43 MB)
π
pidof
(16.7 KB)
π
ping
(66.13 KB)
π
ping6
(66.13 KB)
π
pivot_root
(12.38 KB)
π
plipconfig
(12.71 KB)
π
plymouth-set-default-theme
(6.05 KB)
π
plymouthd
(141.97 KB)
π
poweroff
(218.45 KB)
π
pure-authd
(19.23 KB)
π
pure-certd
(19.13 KB)
π
pure-config.pl
(4.64 KB)
π
pure-ftpd
(182.06 KB)
π
pure-ftpwho
(26.82 KB)
π
pure-mrtginfo
(11.16 KB)
π
pure-quotacheck
(18.81 KB)
π
pure-uploadscript
(19.07 KB)
π
pvchange
(2.61 MB)
π
pvck
(2.61 MB)
π
pvcreate
(2.61 MB)
π
pvdisplay
(2.61 MB)
π
pvmove
(2.61 MB)
π
pvremove
(2.61 MB)
π
pvresize
(2.61 MB)
π
pvs
(2.61 MB)
π
pvscan
(2.61 MB)
π
pwck
(57.27 KB)
π
pwconv
(53.1 KB)
π
pwhistory_helper
(20.43 KB)
π
pwunconv
(53.13 KB)
π
quot
(78.67 KB)
π
quotacheck
(115.75 KB)
π
quotaoff
(83.16 KB)
π
quotaon
(83.16 KB)
π
quotastats
(16.54 KB)
π
raid-check
(3.7 KB)
π
rcmysql
(0 B)
π
rdisc
(24.55 KB)
π
rdma
(187.38 KB)
π
readprofile
(20.55 KB)
π
realm
(144.26 KB)
π
reboot
(218.45 KB)
π
repquota
(83.24 KB)
π
request-key
(24.38 KB)
π
resize2fs
(64.91 KB)
π
resizepart
(41.56 KB)
π
resolvconf
(195.74 KB)
π
restorecon
(20.53 KB)
π
restorecon_xattr
(16.41 KB)
π
rfkill
(53.46 KB)
π
rmmod
(159.95 KB)
π
rndc
(36.53 KB)
π
rndc-confgen
(20.45 KB)
π
rotatelogs
(30.51 KB)
π
route
(67.63 KB)
π
rpc.gssd
(106.55 KB)
π
rpc.idmapd
(61.73 KB)
π
rpc.mountd
(158.92 KB)
π
rpc.nfsd
(49.91 KB)
π
rpc.statd
(103.29 KB)
π
rpcbind
(61.55 KB)
π
rpcctl
(9.41 KB)
π
rpcdebug
(19.38 KB)
π
rpcinfo
(32.64 KB)
π
rsyslogd
(724.73 KB)
π
rtacct
(46.94 KB)
π
rtcwake
(49.31 KB)
π
rtmon
(117.27 KB)
π
rtstat
(25.33 KB)
π
runlevel
(218.45 KB)
π
runq
(1.49 MB)
π
runuser
(48.99 KB)
π
sa
(46.62 KB)
π
sasldblistusers2
(20.77 KB)
π
saslpasswd2
(16.42 KB)
π
sefcontext_compile
(65.35 KB)
π
selabel_digest
(12.28 KB)
π
selabel_lookup
(12.27 KB)
π
selabel_lookup_best_match
(11.89 KB)
π
selabel_partial_match
(11.88 KB)
π
selinux_check_access
(12.36 KB)
π
selinuxconlist
(11.88 KB)
π
selinuxdefcon
(11.88 KB)
π
selinuxenabled
(7.84 KB)
π
selinuxexeccon
(11.86 KB)
π
semodule
(29.27 KB)
π
sendmail
(16.91 KB)
π
service
(3.64 KB)
π
sestatus
(20.41 KB)
π
setcap
(16.27 KB)
π
setenforce
(12.27 KB)
π
setfiles
(20.53 KB)
π
setpci
(28.56 KB)
π
setquota
(91.38 KB)
π
setsebool
(16.38 KB)
π
sfdisk
(118.5 KB)
π
showmount
(21.06 KB)
π
shutdown
(218.45 KB)
π
sim_server
(11.87 KB)
π
slattach
(43.76 KB)
π
sm-notify
(78.14 KB)
π
smartctl
(907.08 KB)
π
smartd
(733.2 KB)
π
snmpd
(32.45 KB)
π
snmptrapd
(32.6 KB)
π
sos
(627 B)
π
sos-collector
(139 B)
π
sosreport
(132 B)
π
ss
(191.3 KB)
π
sshd
(869.77 KB)
π
sss_cache
(61.09 KB)
π
sssd
(73.01 KB)
π
start-statd
(838 B)
π
start-stop-daemon
(45.98 KB)
π
suexec
(25.3 KB)
π
sulogin
(49.24 KB)
π
suphp
(6.56 MB)
π
swaplabel
(16.5 KB)
π
swapoff
(20.74 KB)
π
swapon
(49.4 KB)
π
switch_root
(16.49 KB)
π
sysctl
(28.88 KB)
π
syspurpose
(415 B)
π
tcpdump
(1.01 MB)
π
tcpslice
(32.63 KB)
π
tcsd
(309.72 KB)
π
telinit
(218.45 KB)
π
thin_check
(1.43 MB)
π
thin_delta
(1.43 MB)
π
thin_dump
(1.43 MB)
π
thin_ls
(1.43 MB)
π
thin_metadata_pack
(907.47 KB)
π
thin_metadata_size
(1.43 MB)
π
thin_metadata_unpack
(895.45 KB)
π
thin_repair
(1.43 MB)
π
thin_restore
(1.43 MB)
π
thin_rmap
(1.43 MB)
π
thin_trim
(1.43 MB)
π
timedatex
(33.43 KB)
π
tipc
(163.07 KB)
π
tmpwatch
(35.47 KB)
π
tracepath
(20.44 KB)
π
tracepath6
(20.44 KB)
π
tsig-keygen
(20.46 KB)
π
tune2fs
(110.63 KB)
π
tuned
(3.88 KB)
π
tuned-adm
(6.5 KB)
π
udevadm
(424.59 KB)
π
umount.nfs
(197.24 KB)
π
umount.nfs4
(197.24 KB)
π
unbound-anchor
(57.34 KB)
π
unix_chkpwd
(36.86 KB)
π
unix_update
(36.87 KB)
π
unsquashfs
(99.57 KB)
π
update-alternatives
(36.66 KB)
π
update-pciids
(1.71 KB)
π
update-smart-drivedb
(14.44 KB)
π
useradd
(148.17 KB)
π
userdel
(107.29 KB)
π
usermod
(144.07 KB)
π
usernetctl
(12.4 KB)
π
uuserver
(15.88 KB)
π
vdpa
(118.04 KB)
π
vgcfgbackup
(2.61 MB)
π
vgcfgrestore
(2.61 MB)
π
vgchange
(2.61 MB)
π
vgck
(2.61 MB)
π
vgconvert
(2.61 MB)
π
vgcreate
(2.61 MB)
π
vgdisplay
(2.61 MB)
π
vgexport
(2.61 MB)
π
vgextend
(2.61 MB)
π
vgimport
(2.61 MB)
π
vgimportclone
(2.61 MB)
π
vgimportdevices
(2.61 MB)
π
vgmerge
(2.61 MB)
π
vgmknodes
(2.61 MB)
π
vgreduce
(2.61 MB)
π
vgremove
(2.61 MB)
π
vgrename
(2.61 MB)
π
vgs
(2.61 MB)
π
vgscan
(2.61 MB)
π
vgsplit
(2.61 MB)
π
vigr
(68.05 KB)
π
vipw
(68.05 KB)
π
virt-what
(14.22 KB)
π
visudo
(239.22 KB)
π
vmcore-dmesg
(28.58 KB)
π
vpddecode
(16.47 KB)
π
weak-modules
(33.6 KB)
π
whmapi0
(3.18 MB)
π
whmapi1
(3.18 MB)
π
whmlogin
(2.33 KB)
π
wipefs
(41.11 KB)
π
xfs_admin
(1.38 KB)
π
xfs_bmap
(695 B)
π
xfs_copy
(434.59 KB)
π
xfs_db
(760.47 KB)
π
xfs_estimate
(12.39 KB)
π
xfs_freeze
(800 B)
π
xfs_fsr
(53.41 KB)
π
xfs_growfs
(422.48 KB)
π
xfs_info
(1.26 KB)
π
xfs_io
(188.28 KB)
π
xfs_logprint
(454.7 KB)
π
xfs_mdrestore
(410.09 KB)
π
xfs_metadump
(782 B)
π
xfs_mkfile
(1.02 KB)
π
xfs_ncheck
(685 B)
π
xfs_quota
(93.98 KB)
π
xfs_repair
(715.24 KB)
π
xfs_rtcp
(16.38 KB)
π
xfs_spaceman
(45.42 KB)
π
xfsdump
(308.02 KB)
π
xfsinvutil
(66.91 KB)
π
xfsrestore
(369.39 KB)
π
xqmstats
(16.45 KB)
π
xtables-monitor
(220.8 KB)
π
xtables-nft-multi
(220.8 KB)
π
zdump
(20.57 KB)
π
zic
(52.83 KB)
π
zramctl
(99.09 KB)
Editing: authconfig
#!/usr/libexec/platform-python # -*- coding: utf-8 -*- # # Authors: # Pavel BΕezina <pbrezina@redhat.com> # # Copyright (C) 2018 Red Hat # # 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 os import sys import locale import gettext import subprocess from authcompat_Options import Options from authcompat_EnvironmentFile import EnvironmentFile from authcompat_ConfigSnippet import ConfigSnippet _ = gettext.gettext def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) class Command: TEST = False def __init__(self, command, args, input=None, check=True): self.args = [command] + args self.input = input.encode() if input is not None else None self.check = check self.result = None def run(self): print(_("Executing: %s") % ' '.join(self.args)) if self.TEST: return self.result = subprocess.run(self.args, check=self.check, input=self.input, stdout=subprocess.PIPE, stderr=subprocess.PIPE) class Service: def __init__(self, name): self.name = name + '.service' def runsystemd(self, command, required, enoent_code): try: command.run() except subprocess.CalledProcessError as result: if required and result.returncode == enoent_code: eprint(_("Service %s was not found. Please install the service.") % self.name) elif result.returncode != enoent_code: eprint(_("Command [%s] failed with %d, stderr:") % (' '.join(result.cmd), result.returncode)) eprint(result.stderr.decode()) def enable(self): cmd = Command(Path.System("cmd-systemctl"), ["enable", self.name]) self.runsystemd(cmd, True, 1) def disable(self): cmd = Command(Path.System("cmd-systemctl"), ["disable", self.name]) self.runsystemd(cmd, False, 1) def start(self, Restart=True): if Restart: self.stop() cmd = Command(Path.System("cmd-systemctl"), ["start", self.name]) self.runsystemd(cmd, True, 5) def stop(self): cmd = Command(Path.System("cmd-systemctl"), ["stop", self.name]) self.runsystemd(cmd, False, 5) class Path: LocalDir = os.path.dirname(os.path.realpath(__file__)) Config = EnvironmentFile(LocalDir + "/authcompat_paths") Files = { 'ldap.conf': '/etc/openldap/ldap.conf', 'krb5.conf': '/etc/krb5.conf.d/authconfig-krb.conf', 'sssd.conf': '/etc/sssd/conf.d/authconfig-sssd.conf', 'authconfig': '/etc/sysconfig/authconfig', 'network': '/etc/sysconfig/network', 'pwquality.conf': '/etc/security/pwquality.conf.d/10-authconfig-pwquality.conf', 'yp.conf': '/etc/yp.conf', 'cmd-systemctl': '/usr/bin/systemctl', 'cmd-authselect': '/usr/bin/authselect', 'cmd-realm': '/usr/sbin/realm', 'cmd-domainname': '/usr/bin/domainname', 'cmd-setsebool': '/usr/sbin/setsebool' } @staticmethod def Local(relpath): return "%s/%s" % (Path.LocalDir, relpath) @staticmethod def System(name): return Path.Files[name] class Configuration: class Base(object): def __init__(self, options, ServiceName=None): self.options = options self.service = None if ServiceName is not None: self.service = Service(ServiceName) def isEnabled(self): return True def isDisabled(self): return not self.isEnabled() def enableService(self, nostart): if self.service is None: return self.service.enable() if not nostart: self.service.start() def disableService(self, nostop): if self.service is None: return self.service.disable() if not nostop: self.service.stop() def cleanup(self): return def write(self): return def get(self, name): return self.options.get(name) def isset(self, name): return self.options.isset(name) def getTrueOrNone(self, name): return self.options.getTrueOrNone(name) def getBool(self, name): return self.options.getBool(name) def getBoolAsValue(self, name, if_true, if_false, AllowNone=False): if AllowNone and not self.isset(name): return None value = self.getBool(name) if value: return if_true return if_false def removeFile(self, filename): print(_("Removing file: %s") % filename) if self.options.getBool("test-call"): return try: os.remove(filename) except FileNotFoundError: return class LDAP(Base): def __init__(self, options): super(Configuration.LDAP, self).__init__(options) def write(self): config = EnvironmentFile(Path.System('ldap.conf'), " ", delimiter_re=r"\s\t", quotes=False) if self.isset("ldapserver"): config.set("URI", self.get("ldapserver")) if self.isset("ldapbasedn"): config.set("BASE", self.get("ldapbasedn")) config.write() class Kerberos(Base): def __init__(self, options): super(Configuration.Kerberos, self).__init__(options) def isEnabled(self): if not self.isset("krb5realm") and not self.isset("krb5realmdns"): return None return self.get("krb5realm") != "" or self.getBool("krb5realmdns") def cleanup(self): # Do not remove the file if these options are not set if not self.isset("krb5realm") and not self.isset("krb5realmdns"): return self.removeFile(Path.System('krb5.conf')) def write(self): if self.isDisabled(): return path = Path.Local("snippets/authconfig-krb.conf") config = ConfigSnippet(path, Path.System('krb5.conf')) realm = self.get("krb5realm") keys = { 'realm': self.get("krb5realm"), 'kdc-srv': self.get("krb5kdcdns"), 'realm-srv': self.get("krb5realmdns"), 'kdc': self.get("krb5kdc") if realm else None, 'adminserver': self.get("krb5adminserver") if realm else None, 'domain': realm.lower() if realm else None } config.write(keys) class Network(Base): def __init__(self, options): super(Configuration.Network, self).__init__(options) def write(self): nisdomain = self.get("nisdomain") config = EnvironmentFile(Path.System('network')) if nisdomain is None: return config.set("NISDOMAIN", nisdomain) config.write() class SSSD(Base): def __init__(self, options): super(Configuration.SSSD, self).__init__(options, ServiceName="sssd") def isEnabled(self): if not self.isset("ldap") and not self.isset("sssd"): return None return self.getBool("ldap") or self.getBool("sssd") def cleanup(self): self.removeFile(Path.System('sssd.conf')) def write(self): # Authconfig would not generate sssd in this case so we should not # either. Even if --enablesssd[auth] was provided the configuration # would not be generated. if not self.getBool("ldap"): return path = Path.Local("snippets/authconfig-sssd.conf") config = ConfigSnippet(path, Path.System('sssd.conf')) schema = "rfc2307bis" if self.getBool("rfc2307bis") else None keys = { 'ldap-uri': self.get("ldapserver"), 'ldap-basedn': self.get("ldapbasedn"), 'ldap-tls': self.getTrueOrNone("ldaptls"), 'ldap-schema': schema, 'krb5': self.getTrueOrNone("krb5"), 'kdc-uri': self.get("krb5kdc"), 'kpasswd-uri': self.get("krb5adminserver"), 'realm': self.get("krb5realm"), 'cache-creds': self.getTrueOrNone("cachecreds"), 'cert-auth': self.getTrueOrNone("smartcard") } config.write(keys) os.chmod(Path.System('sssd.conf'), mode=0o600) class Winbind(Base): def __init__(self, options): super(Configuration.Winbind, self).__init__(options, ServiceName="winbind") def isEnabled(self): if not self.isset("winbind") and not self.isset("winbindauth"): return None return self.getBool("winbind") or self.getBool("winbindauth") def write(self): if not self.isset("winbindjoin"): return creds = self.options.get("winbindjoin").split("%", 1) user = creds[0] password = None if len(creds) > 1: password = creds[1] + '\n' args = [ 'join', '-U', '"%s"' % user, '--client-software', 'winbind' ] if self.isset("smbworkgroup"): args.append(self.get("smbworkgroup")) cmd = Command(Path.System('cmd-realm'), args, input=password) try: cmd.run() except FileNotFoundError: eprint(_("%s was not found. Please, install realmd.") % Path.System('cmd-realm')) class PWQuality(Base): def __init__(self, options): super(Configuration.PWQuality, self).__init__(options) def write(self): config = EnvironmentFile(Path.System('pwquality.conf')) value_set = False pwopts = { "minlen": self.get("passminlen"), "minclass": self.get("passminclass"), "maxrepeat": self.get("passmaxrepeat"), "maxclassrepeat": self.get("passmaxclassrepeat"), "lcredit": self.getBoolAsValue("reqlower", -1, 0, AllowNone=True), "ucredit": self.getBoolAsValue("requpper", -1, 0, AllowNone=True), "dcredit": self.getBoolAsValue("reqdigit", -1, 0, AllowNone=True), "ocredit": self.getBoolAsValue("reqother", -1, 0, AllowNone=True) } # Write options only if their are actually set for opt, value in pwopts.items(): if value is not None: print(opt + "=" + str(value)) config.set(opt, value) value_set = True if value_set: config.write() class MakeHomedir(Base): def __init__(self, options): super(Configuration.MakeHomedir, self).__init__(options, ServiceName="oddjobd") def isEnabled(self): if not self.isset("mkhomedir"): return None return self.getBool("mkhomedir") def disableService(self, nostop): # Never disable the service in case it is already running as # other applications may depend on it. return class NIS(Base): def __init__(self, options): super(Configuration.NIS, self).__init__(options) self.rpcbind = Service("rpcbind") self.ypbind = Service("ypbind") def isEnabled(self): if not self.isset("nis"): return None return self.getBool("nis") def enableService(self, nostart): if not self.isset("nisdomain"): return nisdom = self.get("nisdomain") if not nostart: cmd = Command(Path.System('cmd-domainname'), [nisdom]) cmd.run() cmd = Command(Path.System('cmd-setsebool'), ['-P', 'allow_ypbind', '1']) cmd.run() self.rpcbind.enable() self.ypbind.enable() if not nostart: self.rpcbind.start(Restart=False) self.ypbind.start() def disableService(self, nostop): if not nostop: cmd = Command(Path.System('cmd-domainname'), ["(none)"]) cmd.run() cmd = Command(Path.System('cmd-setsebool'), ['-P', 'allow_ypbind', '0']) cmd.run() self.rpcbind.disable() self.ypbind.disable() if not nostop: self.rpcbind.stop() self.ypbind.stop() def write(self): if not self.isset("nisdomain"): return output = "domain " + self.get("nisdomain") additional_servers = [] if self.isset("nisserver"): servers = self.get("nisserver").split(",") additional_servers = servers[1:] output += " server " + servers[0] + "\n" else: output += " broadcast\n" for server in additional_servers: output += "ypserver " + server + "\n" filename = Path.System('yp.conf') if self.getBool("test-call"): print("========== BEGIN Content of [%s] ==========" % filename) print(output) print("========== END Content of [%s] ==========\n" % filename) return with open(filename, "w") as f: f.write(output) class AuthCompat: def __init__(self): self.sysconfig = EnvironmentFile(Path.System('authconfig')) self.options = Options() self.options.parse() self.options.applysysconfig(self.sysconfig) self.options.updatesysconfig(self.sysconfig) def printWarning(self): print(_("Running authconfig compatibility tool.")) print(_("The purpose of this tool is to enable authentication against " "chosen services with authselect and minimum configuration. " "It does not provide all capabilities of authconfig.\n")) print(_("IMPORTANT: authconfig is replaced by authselect, " "please update your scripts.")) print(_("See man authselect-migration(7) to help you with migration to authselect")) options = self.options.getSetButUnsupported() if options: print(_("Warning: These options are not supported anymore " "and have no effect:")) for name in options: print(" --%s" % name) print("") def printOptions(self): for option in Options.List: print("%s=%s" % (option.name, option.value)) def printSysconfig(self): for line in self.sysconfig.getall(): print("%s=%s" % (line.name, line.value)) def canContinue(self): disallowed = ["test", "probe", "restorebackup", "restorelastbackup"] required = ["update", "updateall", "kickstart"] if not self.options.getBool("test") and os.getuid() != 0: print(_("authconfig can only be run as root")) return False for option in disallowed: if self.options.getBool(option): print(_("Error: option --%s is no longer supported and we " "cannot continue if it is set." % option)) return False if self.options.getBool("winbind") != self.options.getBool("winbindauth"): print(_("Error: Both --enablewinbind and --enablewinbindauth must be set.")) return False # We require one of these options to perform changes # We encourage to use --updateall since we no longer support just pure # --update or --kickstart, they will act as --updateall. for option in required: if self.options.getBool(option): return True print(_("Error: Please, provide --updateall option.")) return False def runAuthselect(self): map = { 'smartcard': 'with-smartcard', 'requiresmartcard': 'with-smartcard-required', 'fingerprint': 'with-fingerprint', 'mkhomedir': 'with-mkhomedir', 'faillock': 'with-faillock', 'pamaccess': 'with-pamaccess', 'winbindkrb5': 'with-krb5' } # Read current configuration first. (profile, features) = self.getCurrentAuthselectConfig() # Change profile if requested. if (self.options.getBool("ldap") or self.options.getBool("ldapauth") or self.options.getBool("sssd") or self.options.getBool("sssdauth")): profile = "sssd" elif self.options.getBool("nis"): profile = "nis" elif self.options.getBool("winbind"): profile = "winbind" # Default to sssd if profile is None: profile = "sssd" # Add enabled and remove disabled features. for option, feature in map.items(): if not self.options.isset(option): continue enabled = self.options.getBool(option) if enabled: features.append(feature) else: while feature in features: features.remove(feature) # Add lock-on-smartcard-removal if requested if self.options.isset("smartcardaction"): if int(self.options.get("smartcardaction")) == 0: features.append("with-smartcard-lock-on-removal") else: features.remove("with-smartcard-lock-on-removal") # Remove duplicates. The order is not kept but that does not matter. features = list(set(features)) # Always run with --force. This is either first call of authconfig # in installation script or it is run on already configured system. # We want to use authselect in both cases anyway, since authconfig # would change the configuration either way. args = ["select", profile] args.extend(features) args.append("--force") cmd = Command(Path.System('cmd-authselect'), args) cmd.run() def getCurrentAuthselectConfig(self): cmd = Command(Path.System('cmd-authselect'), ['check'], check=False) cmd.run() if cmd.result is None or cmd.result.returncode != 0: return (None, []) cmd = Command(Path.System('cmd-authselect'), ['current', '--raw']) cmd.run() current = cmd.result.stdout.decode("utf-8").split() return (current[0], current[1:]) def writeConfiguration(self): configs = [ Configuration.LDAP(self.options), Configuration.Network(self.options), Configuration.Kerberos(self.options), Configuration.SSSD(self.options), Configuration.Winbind(self.options), Configuration.PWQuality(self.options), Configuration.MakeHomedir(self.options), Configuration.NIS(self.options) ] for config in configs: # Configuration decides if it needs to write something or not config.write() # Enable or disable service if needed nostart = self.options.getBool("nostart") try: enabled = config.isEnabled() # Skip service management if it can not be decided if enabled is None: continue if enabled: config.enableService(nostart) else: config.disableService(nostart) config.cleanup() except subprocess.CalledProcessError as result: # This is not fatal error. eprint(_("Command [%s] failed with %d, stderr:") % (' '.join(result.cmd), result.returncode)) eprint(result.stderr.decode()) def main(): try: locale.setlocale(locale.LC_ALL, '') except locale.Error: sys.stderr.write('Warning: Unsupported locale setting.\n') authcompat = AuthCompat() authcompat.printWarning() Command.TEST = authcompat.options.getBool("test-call") EnvironmentFile.TEST = authcompat.options.getBool("test-call") ConfigSnippet.TEST = authcompat.options.getBool("test-call") if not authcompat.canContinue(): sys.exit(1) try: authcompat.runAuthselect() authcompat.writeConfiguration() authcompat.sysconfig.write() except subprocess.CalledProcessError as result: eprint(_("Command [%s] failed with %d, stderr:") % (' '.join(result.cmd), result.returncode)) eprint(result.stderr.decode()) sys.exit(0) if __name__ == "__main__": main()
Upload File
Create Folder