Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.1.1 & Your IP : 18.116.82.202
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
sbin /
Delete
Unzip
Name
Size
Permission
Date
Action
ModemManager
2.09
MB
-rwxr-xr-x
2023-12-20 05:35
NetworkManager
3.1
MB
-rwxr-xr-x
2022-06-09 09:27
a2disconf
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2dismod
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2dissite
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2enconf
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2enmod
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2ensite
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2query
9.64
KB
-rwxr-xr-x
2025-04-03 09:05
aa-remove-unknown
3
KB
-rwxr-xr-x
2024-03-06 18:35
aa-status
62.62
KB
-rwxr-xr-x
2024-03-06 18:35
aa-teardown
137
B
-rwxr-xr-x
2022-02-10 00:45
accessdb
14.55
KB
-rwxr-xr-x
2022-03-17 19:03
add-shell
1.03
KB
-rwxr-xr-x
2022-03-23 13:49
addgnupghome
3
KB
-rwxr-xr-x
2025-03-28 17:39
addgroup
37.35
KB
-rwxr-xr-x
2021-01-06 06:16
adduser
37.35
KB
-rwxr-xr-x
2021-01-06 06:16
agetty
55.56
KB
-rwxr-xr-x
2024-04-09 15:32
apache2
740.89
KB
-rwxr-xr-x
2025-04-03 09:05
apache2ctl
7.06
KB
-rwxr-xr-x
2024-03-18 13:41
apachectl
7.06
KB
-rwxr-xr-x
2024-03-18 13:41
apparmor_parser
1.48
MB
-rwxr-xr-x
2024-03-06 18:35
apparmor_status
62.62
KB
-rwxr-xr-x
2024-03-06 18:35
applygnupgdefaults
2.17
KB
-rwxr-xr-x
2025-03-28 17:39
arp
61.61
KB
-rwxr-xr-x
2022-03-24 16:20
arpd
26.33
KB
-rwxr-xr-x
2022-03-24 11:56
arptables
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-nft
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-nft-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-nft-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
badblocks
34.32
KB
-rwxr-xr-x
2023-10-09 01:50
bcache-super-show
14.3
KB
-rwxr-xr-x
2022-03-23 09:42
biosdecode
23.2
KB
-rwxr-xr-x
2022-08-23 23:52
blkdeactivate
15.97
KB
-rwxr-xr-x
2022-02-16 17:06
blkdiscard
22.38
KB
-rwxr-xr-x
2024-04-09 15:32
blkid
50.41
KB
-rwxr-xr-x
2024-04-09 15:32
blkzone
34.38
KB
-rwxr-xr-x
2024-04-09 15:32
blockdev
30.38
KB
-rwxr-xr-x
2024-04-09 15:32
bpftool
1.58
KB
-rwxr-xr-x
2025-04-11 20:45
bridge
92.49
KB
-rwxr-xr-x
2022-03-24 11:56
cache_check
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_dump
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_metadata_size
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_repair
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_restore
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_writeback
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
capsh
30.3
KB
-rwxr-xr-x
2025-02-20 15:51
cfdisk
94.73
KB
-rwxr-xr-x
2024-04-09 15:32
cgdisk
150.48
KB
-rwxr-xr-x
2022-03-23 13:53
chat
34.31
KB
-rwxr-xr-x
2022-02-24 17:14
chcpu
30.38
KB
-rwxr-xr-x
2024-04-09 15:32
check_forensic
952
B
-rwxr-xr-x
2011-04-26 15:10
chgpasswd
58.13
KB
-rwxr-xr-x
2024-02-06 12:54
chmem
34.38
KB
-rwxr-xr-x
2024-04-09 15:32
chpasswd
54.16
KB
-rwxr-xr-x
2024-02-06 12:54
chroot
38.51
KB
-rwxr-xr-x
2024-02-08 03:46
cpgr
48.29
KB
-rwxr-xr-x
2024-02-06 12:54
cppw
48.29
KB
-rwxr-xr-x
2024-02-06 12:54
cron
50.58
KB
-rwxr-xr-x
2022-03-23 13:49
cryptdisks_start
1.51
KB
-rwxr-xr-x
2022-01-13 21:44
cryptdisks_stop
844
B
-rwxr-xr-x
2022-01-13 21:44
cryptsetup
169.55
KB
-rwxr-xr-x
2023-08-22 17:16
cryptsetup-reencrypt
90.38
KB
-rwxr-xr-x
2023-08-22 17:16
cryptsetup-ssh
23.53
KB
-rwxr-xr-x
2023-08-22 17:16
ctrlaltdel
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
dbconfig-generate-include
12.36
KB
-rwxr-xr-x
2021-12-17 20:18
dbconfig-load-include
5.57
KB
-rwxr-xr-x
2021-12-17 20:18
dcb
80.52
KB
-rwxr-xr-x
2022-03-24 11:56
debugfs
229.8
KB
-rwxr-xr-x
2023-10-09 01:50
delgroup
16.11
KB
-rwxr-xr-x
2021-01-06 06:16
deluser
16.11
KB
-rwxr-xr-x
2021-01-06 06:16
depmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
devlink
142.86
KB
-rwxr-xr-x
2022-03-24 11:56
dhclient
442.66
KB
-rwxr-xr-x
2023-01-31 21:54
dhclient-script
15.92
KB
-rwxr-xr-x
2023-01-31 21:54
dmeventd
50.38
KB
-rwxr-xr-x
2022-02-16 17:06
dmidecode
118.98
KB
-rwxr-xr-x
2022-08-23 23:52
dmsetup
171.01
KB
-rwxr-xr-x
2022-02-16 17:06
dmstats
171.01
KB
-rwxr-xr-x
2022-02-16 17:06
dnsmasq
480.24
KB
-rwxr-xr-x
2024-02-14 19:23
dosfsck
82.38
KB
-rwxr-xr-x
2022-03-23 13:51
dosfslabel
38.38
KB
-rwxr-xr-x
2022-03-23 13:51
dpkg-preconfigure
3.58
KB
-rwxr-xr-x
2022-02-20 14:42
dpkg-reconfigure
4.38
KB
-rwxr-xr-x
2022-02-20 14:42
dumpe2fs
30.31
KB
-rwxr-xr-x
2023-10-09 01:50
e2freefrag
14.3
KB
-rwxr-xr-x
2023-10-09 01:50
e2fsck
351.84
KB
-rwxr-xr-x
2023-10-09 01:50
e2image
42.31
KB
-rwxr-xr-x
2023-10-09 01:50
e2label
102.55
KB
-rwxr-xr-x
2023-10-09 01:50
e2mmpstatus
30.31
KB
-rwxr-xr-x
2023-10-09 01:50
e2scrub
7.13
KB
-rwxr-xr-x
2023-10-09 01:50
e2scrub_all
5.27
KB
-rwxr-xr-x
2023-10-09 01:50
e2undo
22.3
KB
-rwxr-xr-x
2023-10-09 01:50
e4crypt
30.38
KB
-rwxr-xr-x
2023-10-09 01:50
e4defrag
30.3
KB
-rwxr-xr-x
2023-10-09 01:50
ebtables
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-nft
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-nft-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-nft-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
era_check
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
era_dump
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
era_invalidate
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
era_restore
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
ethtool
551.48
KB
-rwxr-xr-x
2023-12-12 20:52
faillock
14.15
KB
-rwxr-xr-x
2024-01-10 13:54
fatlabel
38.38
KB
-rwxr-xr-x
2022-03-23 13:51
fdisk
110.42
KB
-rwxr-xr-x
2024-04-09 15:32
filefrag
18.32
KB
-rwxr-xr-x
2023-10-09 01:50
findfs
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
fixparts
58.48
KB
-rwxr-xr-x
2022-03-23 13:53
fsadm
23.94
KB
-rwxr-xr-x
2022-02-16 17:06
fsck
42.42
KB
-rwxr-xr-x
2024-04-09 15:32
fsck.btrfs
1.16
KB
-rwxr-xr-x
2022-02-24 17:39
fsck.cramfs
30.44
KB
-rwxr-xr-x
2024-04-09 15:32
fsck.ext2
351.84
KB
-rwxr-xr-x
2023-10-09 01:50
fsck.ext3
351.84
KB
-rwxr-xr-x
2023-10-09 01:50
fsck.ext4
351.84
KB
-rwxr-xr-x
2023-10-09 01:50
fsck.fat
82.38
KB
-rwxr-xr-x
2022-03-23 13:51
fsck.minix
54.41
KB
-rwxr-xr-x
2024-04-09 15:32
fsck.msdos
82.38
KB
-rwxr-xr-x
2022-03-23 13:51
fsck.vfat
82.38
KB
-rwxr-xr-x
2022-03-23 13:51
fsck.xfs
1.92
KB
-rwxr-xr-x
2022-02-09 04:42
fsfreeze
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
fstab-decode
18.3
KB
-rwxr-xr-x
2021-12-14 21:17
fstrim
42.38
KB
-rwxr-xr-x
2024-04-09 15:32
gdisk
174.48
KB
-rwxr-xr-x
2022-03-23 13:53
genl
90.44
KB
-rwxr-xr-x
2022-03-24 11:56
getcap
14.3
KB
-rwxr-xr-x
2025-02-20 15:51
getpcaps
14.3
KB
-rwxr-xr-x
2025-02-20 15:51
getty
55.56
KB
-rwxr-xr-x
2024-04-09 15:32
groupadd
66.91
KB
-rwxr-xr-x
2024-02-06 12:54
groupdel
62.73
KB
-rwxr-xr-x
2024-02-06 12:54
groupmems
54.19
KB
-rwxr-xr-x
2024-02-06 12:54
groupmod
66.82
KB
-rwxr-xr-x
2024-02-06 12:54
grpck
58.13
KB
-rwxr-xr-x
2024-02-06 12:54
grpconv
50.01
KB
-rwxr-xr-x
2024-02-06 12:54
grpunconv
50.01
KB
-rwxr-xr-x
2024-02-06 12:54
grub-install
1.15
MB
-rwxr-xr-x
2022-12-18 21:21
grub-macbless
929.11
KB
-rwxr-xr-x
2022-12-18 21:21
grub-mkconfig
8.6
KB
-rwxr-xr-x
2022-12-18 21:21
grub-mkdevicemap
215.7
KB
-rwxr-xr-x
2022-12-18 21:21
grub-probe
941.36
KB
-rwxr-xr-x
2022-12-18 21:21
grub-reboot
4.73
KB
-rwxr-xr-x
2022-12-18 21:21
grub-set-default
3.47
KB
-rwxr-xr-x
2022-12-18 21:21
halt
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
hdparm
139.43
KB
-rwxr-xr-x
2022-03-23 13:57
httxt2dbm
14.3
KB
-rwxr-xr-x
2025-04-03 09:05
hwclock
50.5
KB
-rwxr-xr-x
2024-04-09 15:32
iconvconfig
30.4
KB
-rwxr-xr-x
2025-01-28 20:25
ifconfig
77.17
KB
-rwxr-xr-x
2022-03-24 16:20
init
1.76
MB
-rwxr-xr-x
2023-11-21 20:57
insmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
installkernel
2.6
KB
-rwxr-xr-x
2022-03-23 13:49
integritysetup
54.07
KB
-rwxr-xr-x
2023-08-22 17:16
invoke-rc.d
16.12
KB
-rwxr-xr-x
2021-12-07 21:55
ip
702.05
KB
-rwxr-xr-x
2022-03-24 11:56
ip6tables
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-apply
6.89
KB
-rwxr-xr-x
2021-01-15 22:03
ip6tables-legacy
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-legacy-restore
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-legacy-save
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-nft
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-nft-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-nft-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-restore-translate
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-translate
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ipmaddr
18.3
KB
-rwxr-xr-x
2022-03-24 16:20
iptables
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-apply
6.89
KB
-rwxr-xr-x
2021-01-15 22:03
iptables-legacy
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-legacy-restore
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-legacy-save
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-nft
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-nft-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-nft-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-restore-translate
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-translate
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptunnel
18.3
KB
-rwxr-xr-x
2022-03-24 16:20
irqbalance
66.86
KB
-rwxr-xr-x
2023-10-16 09:22
irqbalance-ui
34.38
KB
-rwxr-xr-x
2023-10-16 09:22
iscsi-iname
14.3
KB
-rwxr-xr-x
2022-01-19 11:38
iscsi_discovery
5.17
KB
-rwxr-xr-x
2021-09-05 23:32
iscsiadm
398.46
KB
-rwxr-xr-x
2022-01-19 11:38
iscsid
298.55
KB
-rwxr-xr-x
2022-01-19 11:38
iscsistart
274.56
KB
-rwxr-xr-x
2022-01-19 11:38
isosize
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
iucode-tool
58.34
KB
-rwxr-xr-x
2021-10-07 10:13
iucode_tool
58.34
KB
-rwxr-xr-x
2021-10-07 10:13
kbdrate
18.16
KB
-rwxr-xr-x
2022-12-16 14:14
killall5
30.38
KB
-rwxr-xr-x
2021-12-14 21:17
kpartx
46.16
KB
-rwxr-xr-x
2023-10-31 22:21
ldattach
26.38
KB
-rwxr-xr-x
2024-04-09 15:32
ldconfig
387
B
-rwxr-xr-x
2025-01-28 20:25
ldconfig.real
1.16
MB
-rwxr-xr-x
2025-01-28 20:25
locale-gen
4.29
KB
-rwxr-xr-x
2023-07-26 08:23
logrotate
102.24
KB
-rwxr-xr-x
2022-05-25 14:10
logsave
14.16
KB
-rwxr-xr-x
2023-10-09 01:50
losetup
70.52
KB
-rwxr-xr-x
2024-04-09 15:32
lsmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
luksformat
3.32
KB
-rwxr-xr-x
2022-01-13 21:44
lvchange
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvconvert
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvcreate
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvdisplay
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvextend
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvm
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvmconfig
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvmdiskscan
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvmdump
10.07
KB
-rwxr-xr-x
2022-02-16 17:06
lvmpolld
236.34
KB
-rwxr-xr-x
2022-02-16 17:06
lvmsadc
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvmsar
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvreduce
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvremove
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvrename
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvresize
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvs
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvscan
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
make-bcache
22.38
KB
-rwxr-xr-x
2022-03-23 09:42
make-ssl-cert
6.65
KB
-rwxr-xr-x
2021-12-30 16:52
mdadm
601.31
KB
-rwxr-xr-x
2023-04-11 03:22
mdmon
258.44
KB
-rwxr-xr-x
2023-04-11 03:22
mii-tool
26.73
KB
-rwxr-xr-x
2022-03-24 16:20
mkdosfs
50.83
KB
-rwxr-xr-x
2022-03-23 13:51
mke2fs
130.62
KB
-rwxr-xr-x
2023-10-09 01:50
mkfs
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
mkfs.bfs
22.38
KB
-rwxr-xr-x
2024-04-09 15:32
mkfs.btrfs
471.25
KB
-rwxr-xr-x
2022-02-24 17:39
mkfs.cramfs
34.32
KB
-rwxr-xr-x
2024-04-09 15:32
mkfs.ext2
130.62
KB
-rwxr-xr-x
2023-10-09 01:50
mkfs.ext3
130.62
KB
-rwxr-xr-x
2023-10-09 01:50
mkfs.ext4
130.62
KB
-rwxr-xr-x
2023-10-09 01:50
mkfs.fat
50.83
KB
-rwxr-xr-x
2022-03-23 13:51
mkfs.minix
42.39
KB
-rwxr-xr-x
2024-04-09 15:32
mkfs.msdos
50.83
KB
-rwxr-xr-x
2022-03-23 13:51
mkfs.ntfs
70.38
KB
-rwxr-xr-x
2022-11-01 11:56
mkfs.vfat
50.83
KB
-rwxr-xr-x
2022-03-23 13:51
mkfs.xfs
382.77
KB
-rwxr-xr-x
2022-02-09 04:42
mkhomedir_helper
22.17
KB
-rwxr-xr-x
2024-01-10 13:54
mkinitramfs
12.16
KB
-rwxr-xr-x
2023-07-25 09:54
mklost+found
14.3
KB
-rwxr-xr-x
2023-10-09 01:50
mkntfs
70.38
KB
-rwxr-xr-x
2022-11-01 11:56
mkswap
46.38
KB
-rwxr-xr-x
2024-04-09 15:32
modinfo
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
modprobe
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
mount.fuse
18.3
KB
-rwxr-xr-x
2022-03-23 13:53
mount.fuse3
18.3
KB
-rwxr-xr-x
2022-03-23 13:53
mount.lowntfs-3g
114.98
KB
-rwxr-xr-x
2022-11-01 11:56
mount.ntfs
159.01
KB
-rwxr-xr-x
2022-11-01 11:56
mount.ntfs-3g
159.01
KB
-rwxr-xr-x
2022-11-01 11:56
mpathpersist
31.05
KB
-rwxr-xr-x
2023-10-31 22:21
multipath
34.15
KB
-rwxr-xr-x
2023-10-31 22:21
multipathd
134.26
KB
-rwxr-xr-x
2023-10-31 22:21
mysqld
52.92
MB
-rwxr-xr-x
2025-04-25 17:19
nameif
14.48
KB
-rwxr-xr-x
2022-03-24 16:20
needrestart
38.71
KB
-rwxr-xr-x
2024-12-05 11:58
netplan
798
B
-rwxr-xr-x
2023-05-17 17:11
newusers
74.73
KB
-rwxr-xr-x
2024-02-06 12:54
nfnl_osf
18.3
KB
-rwxr-xr-x
2024-01-16 21:14
nft
26.23
KB
-rwxr-xr-x
2022-08-10 05:36
nologin
14.3
KB
-rwxr-xr-x
2024-02-06 12:54
ntfsclone
50.38
KB
-rwxr-xr-x
2022-11-01 11:56
ntfscp
34.38
KB
-rwxr-xr-x
2022-11-01 11:56
ntfslabel
22.38
KB
-rwxr-xr-x
2022-11-01 11:56
ntfsresize
62.39
KB
-rwxr-xr-x
2022-11-01 11:56
ntfsundelete
50.38
KB
-rwxr-xr-x
2022-11-01 11:56
on_ac_power
2.18
KB
-rwxr-xr-x
2019-07-20 15:43
overlayroot-chroot
2.45
KB
-rwxr-xr-x
2020-08-17 16:00
ownership
14.45
KB
-rwxr-xr-x
2022-08-23 23:52
pam-auth-update
20.5
KB
-rwxr-xr-x
2022-02-07 16:47
pam_extrausers_chkpwd
22.15
KB
-rwxr-sr-x
2024-01-10 13:54
pam_extrausers_update
30.15
KB
-rwxr-xr-x
2024-01-10 13:54
pam_getenv
2.82
KB
-rwxr-xr-x
2020-08-12 00:15
pam_timestamp_check
14.15
KB
-rwxr-xr-x
2024-01-10 13:54
parted
86.4
KB
-rwxr-xr-x
2022-03-24 16:22
partprobe
14.38
KB
-rwxr-xr-x
2022-03-24 16:22
pdata_tools
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
phpdismod
7.11
KB
-rwxr-xr-x
2022-01-28 00:27
phpenmod
7.11
KB
-rwxr-xr-x
2022-01-28 00:27
phpquery
6.24
KB
-rwxr-xr-x
2022-01-28 00:27
pivot_root
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
plipconfig
14.3
KB
-rwxr-xr-x
2022-03-24 16:20
plymouthd
150.55
KB
-rwxr-xr-x
2022-03-18 10:45
poweroff
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
pppd
414.56
KB
-rwsr-xr--
2022-02-24 17:14
pppdump
18.39
KB
-rwxr-xr-x
2022-02-24 17:14
pppoe-discovery
22.3
KB
-rwxr-xr-x
2022-02-24 17:14
pppstats
18.3
KB
-rwxr-xr-x
2022-02-24 17:14
pptp
63.05
KB
-rwxr-xr-x
2022-03-24 16:23
pptpsetup
6.46
KB
-rwxr-xr-x
2022-03-24 16:23
pvchange
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvck
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvcreate
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvdisplay
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvmove
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvremove
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvresize
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvs
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvscan
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pwck
50.13
KB
-rwxr-xr-x
2024-02-06 12:54
pwconv
46.01
KB
-rwxr-xr-x
2024-02-06 12:54
pwunconv
42.01
KB
-rwxr-xr-x
2024-02-06 12:54
rarp
32.33
KB
-rwxr-xr-x
2022-03-24 16:20
readprofile
22.41
KB
-rwxr-xr-x
2024-04-09 15:32
reboot
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
remove-shell
1.07
KB
-rwxr-xr-x
2022-03-23 13:49
resize2fs
66.3
KB
-rwxr-xr-x
2023-10-09 01:50
rmmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
rmt
58.57
KB
-rwxr-xr-x
2023-12-05 05:15
rmt-tar
58.57
KB
-rwxr-xr-x
2023-12-05 05:15
route
64.27
KB
-rwxr-xr-x
2022-03-24 16:20
rsyslogd
767.19
KB
-rwxr-xr-x
2022-05-02 18:45
rtacct
28.31
KB
-rwxr-xr-x
2022-03-24 11:56
rtcwake
34.38
KB
-rwxr-xr-x
2024-04-09 15:32
rtmon
90.39
KB
-rwxr-xr-x
2022-03-24 11:56
runlevel
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
runuser
54.38
KB
-rwxr-xr-x
2024-04-09 15:32
service
8.88
KB
-rwxr-xr-x
2022-02-15 22:32
setcap
14.3
KB
-rwxr-xr-x
2025-02-20 15:51
setvesablank
14.23
KB
-rwxr-xr-x
2022-12-16 14:14
setvtrgb
14.29
KB
-rwxr-xr-x
2022-12-16 14:14
sfdisk
102.38
KB
-rwxr-xr-x
2024-04-09 15:32
sgdisk
162.48
KB
-rwxr-xr-x
2022-03-23 13:53
shadowconfig
885
B
-rwxr-xr-x
2021-11-11 15:42
shutdown
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
slattach
36.08
KB
-rwxr-xr-x
2022-03-24 16:20
split-logfile
2.36
KB
-rwxr-xr-x
2025-04-03 09:05
sshd
899.7
KB
-rwxr-xr-x
2025-04-11 12:05
start-stop-daemon
47.35
KB
-rwxr-xr-x
2024-02-23 14:53
sudo_logsrvd
200.1
KB
-rwxr-xr-x
2023-04-03 18:00
sudo_sendlog
107.34
KB
-rwxr-xr-x
2023-04-03 18:00
sulogin
42.38
KB
-rwxr-xr-x
2024-04-09 15:32
swaplabel
18.38
KB
-rwxr-xr-x
2024-04-09 15:32
swapoff
22.38
KB
-rwxr-xr-x
2024-04-09 15:32
swapon
42.38
KB
-rwxr-xr-x
2024-04-09 15:32
switch_root
22.38
KB
-rwxr-xr-x
2024-04-09 15:32
sysctl
30.23
KB
-rwxr-xr-x
2023-10-31 11:36
tarcat
936
B
-rwxr-xr-x
2023-12-05 05:15
tc
614.08
KB
-rwxr-xr-x
2022-03-24 11:56
telinit
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
thermald
554.6
KB
-rwxr-xr-x
2023-08-10 07:36
thin_check
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_delta
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_dump
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_ls
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_metadata_size
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_repair
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_restore
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_rmap
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_trim
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
tipc
90.44
KB
-rwxr-xr-x
2022-03-24 11:56
tune2fs
102.55
KB
-rwxr-xr-x
2023-10-09 01:50
tzconfig
106
B
-rwxr-xr-x
2025-03-26 17:32
u-d-c-print-pci-ids
517
B
-rwxr-xr-x
2024-07-05 08:55
ufw
4.82
KB
-rwxr-xr-x
2023-07-17 13:55
umount.udisks2
14.3
KB
-rwxr-xr-x
2022-04-07 21:17
unix_chkpwd
26.15
KB
-rwxr-sr-x
2024-01-10 13:54
unix_update
30.15
KB
-rwxr-xr-x
2024-01-10 13:54
update-ca-certificates
5.29
KB
-rwxr-xr-x
2024-09-24 17:46
update-grub
64
B
-rwxr-xr-x
2022-12-02 15:18
update-grub2
64
B
-rwxr-xr-x
2022-12-02 15:18
update-info-dir
1.66
KB
-rwxr-xr-x
2022-02-06 12:48
update-initramfs
6.74
KB
-rwxr-xr-x
2023-07-25 09:54
update-locale
2.99
KB
-rwxr-xr-x
2023-06-16 10:22
update-mime
9.39
KB
-rwxr-xr-x
2021-12-10 23:14
update-passwd
34.56
KB
-rwxr-xr-x
2022-03-23 09:42
update-pciids
1.71
KB
-rwxr-xr-x
2021-08-30 02:45
update-rc.d
16.92
KB
-rwxr-xr-x
2021-12-07 21:55
update-secureboot-policy
7.43
KB
-rwxr-xr-x
2024-01-24 09:14
update-shells
3.72
KB
-rwxr-xr-x
2022-03-23 13:49
usb_modeswitch
59.66
KB
-rwxr-xr-x
2022-03-25 09:53
usb_modeswitch_dispatcher
26.78
KB
-rwxr-xr-x
2022-03-25 09:53
usbmuxd
86.6
KB
-rwxr-xr-x
2022-03-25 09:53
useradd
127.66
KB
-rwxr-xr-x
2024-02-06 12:54
userdel
86.85
KB
-rwxr-xr-x
2024-02-06 12:54
usermod
123.46
KB
-rwxr-xr-x
2024-02-06 12:54
uuidd
30.85
KB
-rwxr-xr-x
2024-04-09 15:32
validlocale
1.73
KB
-rwxr-xr-x
2022-08-02 15:34
vcstime
14.15
KB
-rwxr-xr-x
2022-12-16 14:14
vdpa
30.56
KB
-rwxr-xr-x
2022-03-24 11:56
veritysetup
43.76
KB
-rwxr-xr-x
2023-08-22 17:16
vgcfgbackup
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgcfgrestore
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgchange
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgck
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgconvert
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgcreate
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgdisplay
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgexport
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgextend
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgimport
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgimportclone
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgmerge
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgmknodes
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgreduce
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgremove
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgrename
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgs
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgscan
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgsplit
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vigr
56.53
KB
-rwxr-xr-x
2024-02-06 12:54
vipw
56.53
KB
-rwxr-xr-x
2024-02-06 12:54
visudo
219.79
KB
-rwxr-xr-x
2023-04-03 18:00
vpddecode
14.58
KB
-rwxr-xr-x
2022-08-23 23:52
vsftpd
156.48
KB
-rwxr-xr-x
2024-07-16 07:52
wipefs
38.38
KB
-rwxr-xr-x
2024-04-09 15:32
wpa_action
1.69
KB
-rwxr-xr-x
2022-04-04 13:04
wpa_cli
140.31
KB
-rwxr-xr-x
2025-02-24 19:39
wpa_supplicant
3.24
MB
-rwxr-xr-x
2025-02-24 19:39
xfs_admin
1.37
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_bmap
695
B
-rwxr-xr-x
2022-02-09 04:42
xfs_copy
82.47
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_db
652.42
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_estimate
14.16
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_freeze
800
B
-rwxr-xr-x
2022-02-09 04:42
xfs_fsr
42.17
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_growfs
38.27
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_info
1.26
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_io
199.55
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_logprint
78.32
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_mdrestore
26.16
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_metadump
782
B
-rwxr-xr-x
2022-02-09 04:42
xfs_mkfile
1.02
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_ncheck
685
B
-rwxr-xr-x
2022-02-09 04:42
xfs_quota
90.16
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_repair
599.37
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_rtcp
18.14
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_scrub
106.25
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_scrub_all
5.87
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_spaceman
42.29
KB
-rwxr-xr-x
2022-02-09 04:42
xtables-legacy-multi
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
xtables-monitor
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
xtables-nft-multi
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
zerofree
14.15
KB
-rwxr-xr-x
2022-03-25 09:54
zic
62.32
KB
-rwxr-xr-x
2025-01-28 20:25
zramctl
54.52
KB
-rwxr-xr-x
2024-04-09 15:32
Save
Rename
#!/usr/bin/perl # adduser: a utility to add users to the system # addgroup: a utility to add groups to the system # Copyright (C) 1997, 1998, 1999 Guy Maor <maor@debian.org> # Copyright (C) 1995 Ted Hajek <tedhajek@boombox.micro.umn.edu> # Ian A. Murdock <imurdock@gnu.ai.mit.edu> # Bugfixes and other improvements Roland Bauerschmidt <rb@debian.org> # General scheme of the program adapted by the original debian 'adduser' # program by Ian A. Murdock <imurdock@gnu.ai.mit.edu>. # # 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # #################### # See the usage subroutine for explanation about how the program can be called #################### use warnings; use strict; use Debian::AdduserCommon; use Getopt::Long; my $version = "3.118ubuntu5"; ################### # return values use constant RET_OK => 0; # OK use constant RET_OBJECT_ALREADY_EXISTS => 1; # the user or group does already exist, so the requested action cannot be performed use constant RET_INVALID_CHARS_IN_NAME => 1; # the provided name contains invalid characters use constant RET_ADDUSER_ABORTED => 1; # the program was aborted (eg via Ctrl+C) use constant RET_INVALID_CALL => 1; # getopt returned with "false" BEGIN { local $ENV{PERL_DL_NONLAZY}=1; eval 'use Locale::gettext'; if ($@) { *gettext = sub { shift }; *textdomain = sub { "" }; *LC_MESSAGES = sub { 5 }; } eval { require POSIX; import POSIX qw(setlocale); }; if ($@) { *setlocale = sub { return 1 }; } eval { require I18N::Langinfo; import I18N::Langinfo qw(langinfo YESEXPR NOEXPR); }; if ($@) { *langinfo = sub { return shift; }; *YESEXPR = sub { "^[yY]" }; *NOEXPR = sub { "^[nN]" }; } } setlocale(LC_MESSAGES, ""); textdomain("adduser"); my $yesexpr = langinfo(YESEXPR()); my %config; # configuration hash my @defaults = ("/etc/adduser.conf"); my $nogroup_id = getgrnam("nogroup") || 65534; $0 =~ s+.*/++; our $verbose = 1; # should we be verbose? my $allow_badname = 0; # should we allow bad names? my $ask_passwd = 1; # ask for a passwd? my $disabled_login = 0; # leave the new account disabled? our $configfile = undef; our $found_group_opt = undef; our $found_sys_opt = undef; our $ingroup_name = undef; our $new_firstuid = undef; our $new_gecos = undef; our $new_gid = undef; our $new_lastuid = undef; our $new_uid = undef; our $no_create_home = undef; our $special_home = undef; our $special_shell = undef; our $add_extra_groups = 0; our $use_extrausers = 0; our $encrypt_home = undef; # Global variables we need later my $existing_user = undef; my $existing_group = undef; my $new_name = undef; my $make_group_also = 0; my $home_dir = undef; my $undohome = undef; my $undouser = undef; my $undogroup = undef; my $shell = undef; my $first_uid = undef; my $last_uid = undef; my $dir_mode = undef; my $perm = undef; our @names; # Parse options, sanity checks unless ( GetOptions ("quiet|q" => sub { $verbose = 0 }, "force-badname" => \$allow_badname, "help|h" => sub { &usage(); exit RET_OK }, "version|v" => sub { &version(); exit RET_OK }, "system" => \$found_sys_opt, "group" => \$found_group_opt, "ingroup=s" => \$ingroup_name, "home=s" => \$special_home, "gecos=s" => \$new_gecos, "shell=s" => \$special_shell, "disabled-password" => sub { $ask_passwd = 0 }, "disabled-login" => sub { $disabled_login = 1; $ask_passwd = 0 }, "uid=i" => \$new_uid, "firstuid=i" => \$new_firstuid, "lastuid=i" => \$new_lastuid, "gid=i" => \$new_gid, "conf=s" => \$configfile, "no-create-home" => \$no_create_home, "encrypt-home" => \$encrypt_home, "add_extra_groups" => \$add_extra_groups, "extrausers" => \$use_extrausers, "debug" => sub { $verbose = 2 } ) ) { &usage(); exit RET_INVALID_CALL; } # everyone can issue "--help" and "--version", but only root can go on dief (gtx("Only root may add a user or group to the system.\n")) if ($> != 0); if( defined($configfile) ) { @defaults = ($configfile); } # detect the right mode my $action = $0 eq "addgroup" ? "addgroup" : "adduser"; if (defined($found_sys_opt)) { $action = "addsysuser" if ($action eq "adduser"); $action = "addsysgroup" if ($action eq "addgroup"); } # explicitly set PATH, because super (1) cleans up the path and makes adduser unusable; # this is also a good idea for sudo (which doesn't clean up) $ENV{"PATH"}="/bin:/usr/bin:/sbin:/usr/sbin"; $ENV{"IFS"}=" \t\n"; ############################ # checks related to @names # ############################ while (defined(my $arg = shift(@ARGV))) { push (@names, $arg); } if ( (! defined $names[0]) || length($names[0]) == 0 || @names > 2) { dief (gtx("Only one or two names allowed.\n")); } if (@names == 2) { # must be addusertogroup dief (gtx("Specify only one name in this mode.\n")) if ($action eq "addsysuser" || $found_group_opt); $action = "addusertogroup"; $existing_user = shift (@names); $existing_group = shift (@names); } else { # 1 parameter, must be adduser $new_name = shift (@names); } ################################### # check for consistent parameters # ################################### if ($action ne "addgroup" && defined($found_group_opt) +defined($ingroup_name) +defined($new_gid) > 1 ) { dief (gtx("The --group, --ingroup, and --gid options are mutually exclusive.\n")); } if ((defined($special_home)) && ($special_home !~ m+^/+ )) { dief (gtx("The home dir must be an absolute path.\n")); } if (defined($special_home) && $verbose) { printf gtx("Warning: The home dir %s you specified already exists.\n"),$special_home if (!defined($no_create_home) && -d $special_home); printf gtx("Warning: The home dir %s you specified can't be accessed: %s\n"), $special_home, $! if (defined($no_create_home) && ! -d $special_home); } if ($found_group_opt) { if ($action eq "addsysuser") { $make_group_also = 1; } elsif ($found_sys_opt) { $action = "addsysgroup"; } else { $action = "addgroup"; } } my $ecryptfs_setup_private; if (defined($encrypt_home)) { $ecryptfs_setup_private = &which('ecryptfs-setup-private'); } $ENV{"VERBOSE"} = $verbose; $ENV{"DEBUG"} = $verbose; # preseed configuration data and then read the config file preseed_config(\@defaults,\%config); &checkname($new_name, $found_sys_opt) if defined $new_name; $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'HUP'} = 'handler'; ##### # OK, we've processed the arguments. $action equals one of the following, # and the appropriate variables have been set: # # $action = "adduser" # $new_name - the name of the new user. # $ingroup_name | $new_gid - the group to add the user to # $special_home, $new_uid, $new_gecos - optional overrides # $action = "addgroup" # $new_name - the name of the new group # $new_gid - optional override # $action = "addsysgroup" # $new_name - the name of the new group # $new_gid - optional override # $action = "addsysuser" # $new_name - the name of the new user # $make_group_also | $ingroup_name | $new_gid | 0 - which group # $special_home, $new_uid, $new_gecos - optional overrides # $action = "addusertogroup" # $existing_user - the user to be added # $existing_group - the group to add her to ##### ################# ## addsysgroup ## ################# if ($action eq "addsysgroup") { # Check if requested group already exists and we can exit safely my $ret = existing_group_ok($new_name, $new_gid); if ($ret == 3) { print STDERR "$0: " if $verbose; printf STDERR (gtx("The group `%s' already exists as a system group. Exiting.\n"), $new_name) if $verbose; exit RET_OK; } if ($ret == 1) { print STDERR "$0: " if $verbose; printf STDERR (gtx("The group `%s' already exists and is not a system group. Exiting.\n"), $new_name); exit RET_OBJECT_ALREADY_EXISTS; } if ($ret == 2) { print STDERR "$0: " if $verbose; printf STDERR (gtx("The group `%s' already exists, but has a different GID. Exiting.\n"), $new_name); exit RET_OBJECT_ALREADY_EXISTS; } dief (gtx("The GID `%s' is already in use.\n"),$new_gid) if (defined($new_gid) && defined(getgrgid($new_gid))); if (!defined($new_gid)) { $new_gid = &first_avail_gid($config{"first_system_gid"}, $config{"last_system_gid"}); if ($new_gid == -1) { print STDERR "$0: "; printf STDERR gtx("No GID is available in the range %d-%d (FIRST_SYS_GID - LAST_SYS_GID).\n"),$config{"first_system_gid"},$config{"last_system_gid"}; dief (gtx("The group `%s' was not created.\n"),$new_name); } } printf (gtx("Adding group `%s' (GID %d) ...\n"),$new_name,$new_gid) if $verbose; &invalidate_nscd("group"); my $groupadd = &which('groupadd'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($groupadd, '--extrausers', '-g', $new_gid, $new_name); } else { &systemcall($groupadd, '-g', $new_gid, $new_name); } &invalidate_nscd("group"); print (gtx("Done.\n")) if $verbose; exit RET_OK; } ############## ## addgroup ## ############## if ($action eq "addgroup") { dief (gtx("The group `%s' already exists.\n"),$new_name) if (defined getgrnam($new_name)); dief (gtx("The GID `%s' is already in use.\n"),$new_gid) if (defined($new_gid) && defined(getgrgid($new_gid))); if (!defined($new_gid)) { $new_gid = &first_avail_gid($config{"first_gid"}, $config{"last_gid"}); if ($new_gid == -1) { print STDERR "$0: "; printf STDERR gtx("No GID is available in the range %d-%d (FIRST_GID - LAST_GID).\n"),$config{"first_gid"},$config{"last_gid"}; dief (gtx("The group `%s' was not created.\n"),$new_name); } } printf (gtx("Adding group `%s' (GID %d) ...\n"),$new_name,$new_gid) if $verbose; &invalidate_nscd("group"); my $groupadd = &which('groupadd'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($groupadd, '--extrausers', '-g', $new_gid, $new_name); } else { &systemcall($groupadd, '-g', $new_gid, $new_name); } &invalidate_nscd("group"); print (gtx("Done.\n")) if $verbose; exit RET_OK; } #################### ## addusertogroup ## #################### if ($action eq "addusertogroup") { dief (gtx("The user `%s' does not exist.\n"),$existing_user) if (!defined getpwnam($existing_user)); dief (gtx("The group `%s' does not exist.\n"),$existing_group) if (!defined getgrnam($existing_group)); if (&user_is_member($existing_user, $existing_group)) { printf gtx("The user `%s' is already a member of `%s'.\n"), $existing_user,$existing_group if $verbose; exit RET_OK; # not really an error } printf gtx("Adding user `%s' to group `%s' ...\n"),$existing_user,$existing_group if $verbose; &invalidate_nscd(); my $gpasswd = &which('gpasswd'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($gpasswd, '--extrausers', '-a',$existing_user,$existing_group); } else { &systemcall($gpasswd, '-a',$existing_user,$existing_group); } &invalidate_nscd(); print (gtx("Done.\n")) if $verbose; exit RET_OK; } ################ ## addsysuser ## ################ if ($action eq "addsysuser") { if (existing_user_ok($new_name, $new_uid) == 1) { # a user with this name already exists; it's a problem when it's not a system user my $tmp_u = getpwnam($new_name); if (($tmp_u >= $config{"first_system_uid"}) and ($tmp_u <= $config{"last_system_uid"})) { printf (gtx("The system user `%s' already exists. Exiting.\n"), $new_name) if $verbose; exit RET_OK } warnf (gtx("The user `%s' already exists, but is not a system user. Exiting.\n"), $new_name); exit RET_OBJECT_ALREADY_EXISTS; } if (existing_user_ok($new_name, $new_uid) == 2) { warnf (gtx("The user `%s' already exists with a different UID. Exiting.\n"), $new_name); exit RET_OBJECT_ALREADY_EXISTS; } if (!$ingroup_name && !defined($new_gid) && !$make_group_also) { $new_gid = $nogroup_id; } check_user_group(1); if (!defined($new_uid) && $make_group_also) { $new_uid = &first_avail_uid($config{"first_system_uid"}, $config{"last_system_uid"}); if ($new_uid == -1) { print STDERR "$0: "; printf STDERR gtx("No UID/GID pair is available in the range %d-%d (FIRST_SYS_UID - LAST_SYS_UID).\n"),$config{"first_system_uid"},$config{"last_system_uid"}; dief (gtx("The user `%s' was not created.\n"),$new_name); } $new_gid = &first_avail_gid($config{"first_system_gid"}, $config{"last_system_gid"}); $ingroup_name = $new_name; } elsif (!defined($new_uid) && !$make_group_also) { $new_uid = &first_avail_uid($config{"first_system_uid"}, $config{"last_system_uid"}); if ($new_uid == -1) { print STDERR "$0: "; printf STDERR gtx("No UID is available in the range %d-%d (FIRST_SYS_UID - LAST_SYS_UID).\n"),$config{"first_system_uid"},$config{"last_system_uid"}; dief (gtx("The user `%s' was not created.\n"),$new_name); } if (defined($new_gid)) { $ingroup_name = getgrgid($new_gid); } elsif ($ingroup_name) { $new_gid = getgrnam($ingroup_name); } else { dief (gtx("Internal error")); } } else { if (defined($new_gid)) { $ingroup_name = getgrgid($new_gid); } elsif ($ingroup_name) { $new_gid = getgrnam($ingroup_name); } elsif ($make_group_also){ $new_gid=$new_uid; $ingroup_name=$new_name; } else { dief (gtx("Internal error")); } } printf (gtx("Adding system user `%s' (UID %d) ...\n"),$new_name,$new_uid) if $verbose; &invalidate_nscd(); # if we reach this point, and the group does already exist, we can use it. if ($make_group_also && !getgrnam($new_name)) { printf (gtx("Adding new group `%s' (GID %d) ...\n"),$new_name,$new_gid) if $verbose; $undogroup = $new_name; my $groupadd = &which('groupadd'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($groupadd, '--extrausers', '-g', $new_gid, $new_name); } else { &systemcall($groupadd, '-g', $new_gid, $new_name); } &invalidate_nscd("group"); } printf gtx("Adding new user `%s' (UID %d) with group `%s' ...\n"),$new_name,$new_uid,$ingroup_name if $verbose; $home_dir = $special_home || &homedir($new_name, $ingroup_name); $shell = $special_shell || '/usr/sbin/nologin'; $undouser = $new_name; my $useradd = &which('useradd'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($useradd, '--extrausers', '-d', $home_dir, '-g', $ingroup_name, '-s', $shell, '-u', $new_uid, $new_name); } else { &systemcall($useradd, '-d', $home_dir, '-g', $ingroup_name, '-s', $shell, '-u', $new_uid, $new_name); } if(!$disabled_login) { my $usermod = &which('usermod'); &systemcall($usermod, '-p', '*', $new_name); } my $chage = &which('chage'); print "$chage -M 99999 $new_name\n" if ($verbose > 1); # do _not_ use systemcall() here, since systemcall() dies on # non-zero exit code and we need to do special handling here! if (system($chage, '-M', '99999', $new_name)) { if( ($?>>8) ne 15 ) { &cleanup(sprintf((gtx("`%s' returned error code %d. Exiting.\n")), "$chage -M 99999 $new_name", $?>>8)) if ($?>>8); &cleanup(sprintf((gtx("`%s' exited from signal %d. Exiting.\n")), "$chage -M 99999 $new_name", $?&255)); } else { printf STDERR (gtx("%s failed with return code 15, shadow not enabled, password aging cannot be set. Continuing.\n"), $chage); } } &invalidate_nscd(); if(defined($new_gecos)) { &ch_gecos($new_gecos); } create_homedir (0); exit RET_OK; } ############# ## adduser ## ############# if ($action eq "adduser") { if (!$ingroup_name && !defined($new_gid)) { if ($config{"usergroups"} =~ /yes/i) { $make_group_also = 1; } else { $new_gid = $config{"users_gid"}; } } check_user_group(0); $first_uid = $new_firstuid || $config{"first_uid"}; $last_uid = $new_lastuid || $config{"last_uid"}; printf (gtx("Adding user `%s' ...\n"),$new_name) if $verbose; if (!defined($new_uid) && $make_group_also) { $new_uid = &first_avail_uid($first_uid, $last_uid); if ($new_uid == -1) { print STDERR "$0: "; printf STDERR gtx("No UID/GID pair is available in the range %d-%d (FIRST_UID - LAST_UID).\n"),$first_uid,$last_uid; dief (gtx("The user `%s' was not created.\n"),$new_name); } $new_gid = &first_avail_gid($config{"first_gid"}, $config{"last_gid"}); $ingroup_name = $new_name; } elsif (!defined($new_uid) && !$make_group_also) { $new_uid = &first_avail_uid($first_uid, $last_uid); if ($new_uid == -1) { print STDERR "$0: "; printf STDERR gtx("No UID is available in the range %d-%d (FIRST_UID - LAST_UID).\n"),$config{"first_uid"},$config{"last_uid"}; dief (gtx("The user `%s' was not created.\n"),$new_name); } if (defined($new_gid)) { $ingroup_name = getgrgid($new_gid); } elsif ($ingroup_name) { $new_gid = getgrnam($ingroup_name); } else { dief (gtx("Internal error")); } } else { if (defined($new_gid)) { $ingroup_name = getgrgid($new_gid); } elsif ($ingroup_name) { $new_gid = getgrnam($ingroup_name); } elsif ($make_group_also){ $new_gid=$new_uid; $ingroup_name=$new_name; } else { dief (gtx("Internal error")); } } &invalidate_nscd(); if ($make_group_also) { printf (gtx("Adding new group `%s' (%d) ...\n"),$new_name,$new_gid) if $verbose; $undogroup = $new_name; my $groupadd = &which('groupadd'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($groupadd, '--extrausers', '-g', $new_gid, $new_name); } else { &systemcall($groupadd, '-g', $new_gid, $new_name); } &invalidate_nscd(); } printf gtx("Adding new user `%s' (%d) with group `%s' ...\n"),$new_name,$new_uid,$ingroup_name if $verbose; $home_dir = $special_home || &homedir($new_name, $ingroup_name); $shell = $special_shell || $config{"dshell"}; $undouser = $new_name; my $useradd = &which('useradd'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($useradd, '--extrausers', '-d', $home_dir, '-g', $ingroup_name, '-s', $shell, '-u', $new_uid, $new_name); } else { &systemcall($useradd, '-d', $home_dir, '-g', $ingroup_name, '-s', $shell, '-u', $new_uid, $new_name); } &invalidate_nscd(); create_homedir (1); # copy skeleton data # useradd without -p has left the account disabled (password string is '!') my $yesexpr = langinfo(YESEXPR()); if ($ask_passwd) { for (;;) { my $passwd = &which('passwd'); # do _not_ use systemcall() here, since systemcall() dies on # non-zero exit code and we need to do special handling here! system($passwd, $new_name); my $ok = $?>>8; if ($ok != 0) { my $answer; # hm, error, should we break now? print (gtx("Permission denied\n")) if ($ok == 1); print (gtx("invalid combination of options\n")) if ($ok == 2); print (gtx("unexpected failure, nothing done\n")) if ($ok == 3); print (gtx("unexpected failure, passwd file missing\n")) if ($ok == 4); print (gtx("passwd file busy, try again\n")) if ($ok == 5); print (gtx("invalid argument to option\n")) if ($ok == 6); # Translators: [y/N] has to be replaced by values defined in your # locale. You can see by running "locale noexpr" which regular # expression will be checked to find positive answer. print (gtx("Try again? [y/N] ")); chop ($answer=<STDIN>); last if ($answer !~ m/$yesexpr/o); } else { last; ## passwd ok } } } else { if(!$disabled_login) { my $usermod = &which('usermod'); &systemcall($usermod, '-p', '*', $new_name); } } if (defined($new_gecos)) { &ch_gecos($new_gecos); } else { my $noexpr = langinfo(NOEXPR()); for (;;) { my $chfn = &which('chfn'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($chfn, '--extrausers', $new_name); } else { &systemcall($chfn, $new_name); } # Translators: [y/N] has to be replaced by values defined in your # locale. You can see by running "locale yesexpr" which regular # expression will be checked to find positive answer. print (gtx("Is the information correct? [Y/n] ")); chop (my $answer=<STDIN>); last if ($answer !~ m/$noexpr/o); } } if ( ( $add_extra_groups || $config{"add_extra_groups"} ) && defined($config{"extra_groups"}) ) { printf (gtx("Adding new user `%s' to extra groups ...\n"), $new_name); foreach my $newgrp ( split ' ', $config{"extra_groups"} ) { if (!defined getgrnam($newgrp)) { warnf (gtx("The group `%s' does not exist.\n"),$newgrp); next; } if (&user_is_member($new_name, $newgrp)) { printf gtx("The user `%s' is already a member of `%s'.\n"), $new_name,$newgrp if $verbose; next; } printf gtx("Adding user `%s' to group `%s' ...\n"),$new_name,$newgrp if $verbose; &invalidate_nscd(); my $gpasswd = &which('gpasswd'); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($gpasswd, '--extrausers', '-M', join(',', get_group_members($newgrp), $new_name), $newgrp); } else { &systemcall($gpasswd, '-M', join(',', get_group_members($newgrp), $new_name), $newgrp); } &invalidate_nscd(); } } if ($config{"quotauser"}) { printf (gtx("Setting quota for user `%s' to values of user `%s' ...\n"), $new_name, $config{quotauser}); my $edquota = &which('edquota'); &systemcall($edquota, '-p', $config{quotauser}, $new_name); } &systemcall('/usr/local/sbin/adduser.local', $new_name, $new_uid, $new_gid, $home_dir) if (-x "/usr/local/sbin/adduser.local"); exit RET_OK; } # # we never go here # # calculate home directory sub homedir { my $dir = $config{"dhome"}; $dir .= '/' . $_[1] if ($config{"grouphomes"} =~ /yes/i); $dir .= '/' . substr($_[0],0,1) if ($config{"letterhomes"} =~ /yes/i); $dir .= '/' . $_[0]; return $dir; } # create_homedir -- create the homedirectory # parameter # 1: $copy_skeleton: # if 0 -> don't copy the skeleton data # if 1 -> copy the files in /etc/skel to the newly created home directory # return values: # none sub create_homedir { my ($copy_skeleton) = @_; if ($no_create_home) { printf gtx("Not creating home directory `%s'.\n"), $home_dir if $verbose; } elsif (-e $home_dir) { printf gtx("The home directory `%s' already exists. Not copying from `%s'.\n"), $home_dir,$config{skel} if $verbose && !$no_create_home; my @homedir_stat = stat($home_dir); my $home_uid = $homedir_stat[4]; my $home_gid = $homedir_stat[5]; if (($home_uid != $new_uid) || ($home_gid != $new_gid)) { warnf gtx("Warning: The home directory `%s' does not belong to the user you are currently creating.\n"), $home_dir; } undef @homedir_stat; undef $home_uid; undef $home_gid; } else { printf gtx("Creating home directory `%s' ...\n"),$home_dir if $verbose; $undohome = $home_dir; &mktree($home_dir) || &cleanup(sprintf(gtx("Couldn't create home directory `%s': %s.\n"), $home_dir, $!)); chown($new_uid, $new_gid, $home_dir) || &cleanup("chown $new_uid:$new_gid $home_dir: $!\n"); $dir_mode = get_dir_mode($make_group_also); chmod ($dir_mode, $home_dir) || &cleanup("chmod $dir_mode $home_dir: $!\n"); if ($action eq "adduser") { # Mute the command system('sh' => ( '-c' => '"$@" >/dev/null 2>&1', '--', '/usr/sbin/zsysctl', 'userdata', 'create', $new_name, $home_dir,)); chown($new_uid, $new_gid, $home_dir) || &cleanup("chown $new_uid:$new_gid $home_dir: $!\n"); $dir_mode = get_dir_mode($make_group_also); chmod ($dir_mode, $home_dir) || &cleanup("chmod $dir_mode $home_dir: $!\n"); } if (defined($encrypt_home)) { printf gtx("Setting up encryption ...\n") if $verbose; &systemcall($ecryptfs_setup_private, '-b', '-u', $new_name); } if ($config{"skel"} && $copy_skeleton) { printf gtx("Copying files from `%s' ...\n"),$config{skel} if $verbose; open(my $FIND, "cd $config{skel}; find . -print |") || &cleanup(sprintf(gtx("fork for `find' failed: %s\n"), $!)); while (<$FIND>) { chop; next if ($_ eq "."); next if ($_ =~ qr/$config{skel_ignore_regex}/ ); ©_to_dir($config{"skel"}, $_, $home_dir, $new_uid, $new_gid, ($config{"setgid_home"} =~ /yes/i)); } } if (defined($encrypt_home)) { &systemcall("/bin/umount", $home_dir); } } } # mktree: create a directory and all parent directories, we don't care about the rights and so on # parameters: # tree: the path # return values: # none sub mktree { my($tree) = @_; my($done, @path); my $default_dir_mode = 0755; $tree =~ s:^/*(.*)/*$:$1:; # chop off leading & trailing slashes @path = split(/\//, $tree); $done = ""; while (@path) { $done .= '/' . shift(@path); -d $done || mkdir($done, $default_dir_mode) || return 0; } return 1; } # existing_user_ok: check if there's already a user present on the system which satisfies the requirements # parameter: # new_name: the name of the user to check # new_uid : the UID of the user # return values: # 0 if the the user doesn't exist # 1 if the user already exists with the specified uid (or $new_uid wasn't specified) # 2 if the user already exists, but $new_uid doesn't matches its uid sub existing_user_ok { my($new_name,$new_uid) = @_; my ($dummy1,$dummy2,$uid); if (($dummy1,$dummy2,$uid) = getpwnam($new_name)) { if( defined($new_uid) && $uid == $new_uid ) { return 1; } if (! defined($new_uid)) { return 1; } # TODO: do we really need this code? Range check shouldn't performed here if( $uid >= $config{"first_system_uid"} && $uid <= $config{"last_system_uid" } ) { return 2; } } else { return 0; } } # existing_group_ok: check if there's already a group which satiesfies the requirements # parameter: # new_name: the name of the group # new_gid : the UID of the group # return values: # 0 if the group doesn't exist # 1 if the group already exists with the specified gid (or $new_gid wasn't specified) # 2 if the group already exists, but $new_gid doesn't match its gid # 3 if the group already exists inside the system range sub existing_group_ok { my($new_name,$new_gid) = @_; my ($dummy1,$dummy2,$gid); if (($dummy1,$dummy2,$gid) = getgrnam($new_name)) { # TODO: is this check required? There shouldn't be any gid outside of our allowed range anyways ... if( $gid >= $config{"first_system_gid"} && $gid <= $config{"last_system_gid" } ) { return 3; } if (! defined($new_gid)) { return 1; } if ($gid == $new_gid) { return 1; } else { return 2; } } else { return 0; } } # check_user_group: ??? # parameters: # system: 0 if the user isn't a system user, 1 otherwise # return values: # sub check_user_group { my ($system) = @_; if( !$system || !existing_user_ok($new_name, $new_uid) ) { if( defined getpwnam($new_name) ) { if( $system ) { dief (gtx("The user `%s' already exists, and is not a system user.\n"),$new_name); } else { dief (gtx("The user `%s' already exists.\n"),$new_name); } } dief (gtx("The UID %d is already in use.\n"),$new_uid) if (defined($new_uid) && getpwuid($new_uid)); } if ($make_group_also) { if( !$system || !existing_group_ok($new_name, $new_uid) ) { dief (gtx("The group `%s' already exists.\n"),$new_name) if (defined getgrnam($new_name)); dief (gtx("The GID %d is already in use.\n"),$new_uid) if (defined($new_uid) && defined(getgrgid($new_uid))); } } else { dief (gtx("The group `%s' does not exist.\n"),$ingroup_name) if ($ingroup_name && !defined(getgrnam($ingroup_name))); dief (gtx("The GID %d does not exist.\n"),$new_gid) if (defined($new_gid) && !defined(getgrgid($new_gid))); } } # copy_to_dir : # parameters: # fromdir # file # todir # newi # newg # sgiddir # return values: # none sub copy_to_dir { my($fromdir, $file, $todir, $newu, $newg, $sgiddir) = @_; if (-l "$fromdir/$file") { my $target=readlink("$fromdir/$file") or &cleanup("readlink: $!\n"); my $curgid="$)"; my $curuid="$>"; my $error=""; $)="$newg"; $>="$newu"; symlink("$target", "$todir/$file") or $error="$!"; $>="$curuid"; $)="$curgid"; if( "$error" ne "" ) { &cleanup("symlink: $!\n"); } return; } elsif (-f "$fromdir/$file") { open (FILE, "$fromdir/$file") || &cleanup("open $fromdir/$file: $!"); open (NEWFILE, ">$todir/$file") || &cleanup("open >$todir/$file: $!"); (print NEWFILE <FILE>) || &cleanup("print $todir/$file: $!"); close FILE; close(NEWFILE) || &cleanup("close $todir/$file "); } elsif (-d "$fromdir/$file") { mkdir("$todir/$file", 700) || &cleanup("mkdir: $!"); } else { &cleanup(sprintf((gtx("Cannot deal with %s.\nIt is not a dir, file, or symlink.\n")), "$fromdir/$file")); } chown($newu, $newg, "$todir/$file") || &cleanup("chown $newu:$newg $todir/$file: $!\n"); $perm = (stat("$fromdir/$file"))[2] & 07777; $perm |= 02000 if (-d "$fromdir/$file" && ($perm & 010) && $sgiddir); chmod($perm, "$todir/$file") || &cleanup("chmod $todir/$file: $!\n"); } # checkname: perform some sanity checks # parameters: # name: the name to check # system: 0 if the user isn't a system user, 1 otherwise # return values: # none (exits on error) sub checkname { my ($name, $system) = @_; if ($name !~ /^[_.A-Za-z0-9][-\@_.A-Za-z0-9]*\$?$/) { printf STDERR (gtx("%s: To avoid problems, the username should consist only of letters, digits, underscores, periods, at signs and dashes, and not start with a dash (as defined by IEEE Std 1003.1-2001). For compatibility with Samba machine accounts \$ is also supported at the end of the username\n"), $0); exit RET_INVALID_CHARS_IN_NAME;; } if ($system ? $name !~ qr/$config{"name_regex_system"}/ : $name !~ qr/$config{"name_regex"}/) { if ($allow_badname) { print (gtx("Allowing use of questionable username.\n")) if ($verbose); } else { printf STDERR (gtx("%s: Please enter a username matching the regular expression configured via the NAME_REGEX[_SYSTEM] configuration variable. Use the `--force-badname' option to relax this check or reconfigure NAME_REGEX.\n"), $0); exit RET_INVALID_CHARS_IN_NAME; } } } # first_avail_uid: return the first available uid in given range # parameters: # min, max: the range # return values: # -1 if no free uid is available # otherwise the choosen uid sub first_avail_uid { my ($min, $max) = @_; printf (gtx("Selecting UID from range %d to %d ...\n"),$min,$max) if ($verbose > 1); my $t = $min; while ($t <= $max) { return $t if (!defined(getpwuid($t))); $t++; } return -1; # nothing available } # first_avail_gid: return the first available gid in given range # parameters: # min, max: the range # return values: # -1 if no free gid is available # otherwise the choosen gid sub first_avail_gid { my ($min, $max) = @_; printf (gtx("Selecting GID from range %d to %d ...\n"),$min,$max) if ($verbose > 1); my $t = $min; while ($t <= $max) { return $t if (!defined(getgrgid($t))); $t++; } return -1; # nothing available } sub ch_gecos { my $chfn = &which('chfn'); my $gecos = shift; if($gecos =~ /,/) { my($gecos_name,$gecos_room,$gecos_work,$gecos_home,$gecos_other) = split(/,/,$gecos); if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($chfn, '--extrausers', '-f', $gecos_name, '-r', $gecos_room, $new_name); &systemcall($chfn,'--extrausers','-w',$gecos_work,$new_name) if(defined($gecos_work)); &systemcall($chfn,'--extrausers','-h',$gecos_home,$new_name) if(defined($gecos_home)); &systemcall($chfn,'--extrausers','-o',$gecos_other,$new_name) if(defined($gecos_other)); } else { &systemcall($chfn, '-f', $gecos_name, '-r', $gecos_room, $new_name); &systemcall($chfn,'-w',$gecos_work,$new_name) if(defined($gecos_work)); &systemcall($chfn,'-h',$gecos_home,$new_name) if(defined($gecos_home)); &systemcall($chfn,'-o',$gecos_other,$new_name) if(defined($gecos_other)); } } else { if ( ($use_extrausers) || ($config{"use_extrausers"}) ) { &systemcall($chfn, '--extrausers', '-f', $gecos, $new_name); } else { &systemcall($chfn, '-f', $gecos, $new_name); } } } # user is member of group? sub user_is_member { my($user, $group) = @_; for (split(/ /, (getgrnam($group))[3])) { return 1 if ($user eq $_); } return 0; } sub cleanup { my ($msg) = @_; printf (gtx("Stopped: %s\n"),$msg); if ($undohome) { printf (gtx("Removing directory `%s' ...\n"),$undohome); &systemcall('rm', '-rf', $undohome); } if ($undouser) { printf (gtx("Removing user `%s' ...\n"),$undouser); &systemcall('userdel', $undouser); } if ($undogroup) { printf (gtx("Removing group `%s' ...\n"),$undogroup); &systemcall('groupdel', $undogroup); } # do we need to invalidate the nscd cache here, too? exit RET_ADDUSER_ABORTED; } sub handler { my($sig) = @_; # Translators: the variable %s is INT, QUIT, or HUP. # Please do not insert a space character between SIG and %s. &cleanup(sprintf(gtx("Caught a SIG%s.\n"), $sig)); } sub version { printf (gtx("adduser version %s\n\n"), $version); print gtx("Adds a user or group to the system. Copyright (C) 1997, 1998, 1999 Guy Maor <maor\@debian.org> Copyright (C) 1995 Ian Murdock <imurdock\@gnu.ai.mit.edu>, Ted Hajek <tedhajek\@boombox.micro.umn.edu> \n"); print gtx( "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 2 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, /usr/share/common-licenses/GPL, for more details. "); } sub usage { printf gtx( "adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] [--encrypt-home] USER Add a normal user adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] USER Add a system user adduser --group [--gid ID] GROUP addgroup [--gid ID] GROUP Add a user group addgroup --system [--gid ID] GROUP Add a system group adduser USER GROUP Add an existing user to an existing group general options: --quiet | -q don't give process information to stdout --force-badname allow usernames which do not match the NAME_REGEX[_SYSTEM] configuration variable --extrausers uses extra users as the database --help | -h usage message --version | -v version number and copyright --conf | -c FILE use FILE as configuration file\n\n"); } sub get_dir_mode { my $setgid = shift; # no longer make home directories setgid per default (closes: #64806) $setgid = 0 unless $config{"setgid_home"} =~ /yes/i; my $dir_mode = $config{"dir_mode"}; if(!defined($dir_mode) || ! ($dir_mode =~ /[0-7]{3}/ || $dir_mode =~ /[0-7]{4}/)) { $dir_mode = $setgid ? 2755 : 0755; } else { $dir_mode = $config{"dir_mode"}; if($setgid && (length($dir_mode) == 3 || $dir_mode =~ /^[0-1|4-5][0-7]{3}$/)) { $dir_mode += 2000; } } return oct($dir_mode); } # Local Variables: # mode:cperl # cperl-indent-level:4 # End: # vim:set ai et sts=4 sw=4 tw=0: