mirror of
https://github.com/webmin/webmin.git
synced 2026-02-05 23:22:15 +00:00
Compare commits
109 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24bd1daf6e | ||
|
|
d880b7a8e3 | ||
|
|
0fc43dc254 | ||
|
|
1467fc769a | ||
|
|
ecdd7c458f | ||
|
|
a84f70d05c | ||
|
|
0bc86a3147 | ||
|
|
28ee04c6d7 | ||
|
|
8725fd83fc | ||
|
|
b64effa5f1 | ||
|
|
e505ecef2e | ||
|
|
7ebef3d060 | ||
|
|
f437eab3c4 | ||
|
|
05c6c917f5 | ||
|
|
35e05c7f85 | ||
|
|
fbe5604588 | ||
|
|
a616d828e8 | ||
|
|
c974590077 | ||
|
|
a8927f42f1 | ||
|
|
3b8861b1c9 | ||
|
|
2fe48a7b48 | ||
|
|
5b5f86c1a1 | ||
|
|
47af093d57 | ||
|
|
72e608c857 | ||
|
|
0c85e067df | ||
|
|
31a5f1781b | ||
|
|
fe7d915262 | ||
|
|
1c03e37a80 | ||
|
|
86fe633785 | ||
|
|
cb4e9508fd | ||
|
|
09436eda3b | ||
|
|
b48e86dded | ||
|
|
584d22020e | ||
|
|
8e702239c3 | ||
|
|
41b15fb101 | ||
|
|
e9999de7a8 | ||
|
|
1b09f176fc | ||
|
|
be5684df20 | ||
|
|
7ee351b511 | ||
|
|
83ce82502d | ||
|
|
b72dc18e72 | ||
|
|
7123f239ce | ||
|
|
3fc3f564d1 | ||
|
|
175ed8b3df | ||
|
|
59f877ffad | ||
|
|
a7eaef4517 | ||
|
|
0b2973dcbe | ||
|
|
291a0f58eb | ||
|
|
eb122dff5e | ||
|
|
26abfef1ab | ||
|
|
98259a6128 | ||
|
|
da136f4476 | ||
|
|
91df388044 | ||
|
|
fc638f5d90 | ||
|
|
f358fa2a98 | ||
|
|
058c63c606 | ||
|
|
158fd0b6b4 | ||
|
|
575a801c6d | ||
|
|
3db32b8cfa | ||
|
|
04cb9899b2 | ||
|
|
84572640e7 | ||
|
|
5fc0bc9ce5 | ||
|
|
c4a5b46b6e | ||
|
|
a946e958f9 | ||
|
|
ae64743265 | ||
|
|
08468bfb8b | ||
|
|
5f72cb63d4 | ||
|
|
c116e919cd | ||
|
|
679b57c6ff | ||
|
|
4cb4177ae6 | ||
|
|
7259d0199d | ||
|
|
39b14afb7e | ||
|
|
ea8587578a | ||
|
|
88c5dc21f2 | ||
|
|
638895ea67 | ||
|
|
cbfeb6aa01 | ||
|
|
e6017f7761 | ||
|
|
d6e50e7f41 | ||
|
|
11d382cb36 | ||
|
|
9feae324d6 | ||
|
|
407ac1a1a0 | ||
|
|
50b0da315f | ||
|
|
db132bf00c | ||
|
|
17724f2b9b | ||
|
|
1b54c49813 | ||
|
|
e79a678a78 | ||
|
|
e54887482d | ||
|
|
49f75d239a | ||
|
|
5110269a57 | ||
|
|
1abd48d958 | ||
|
|
fe7a48170a | ||
|
|
ae071bf4f6 | ||
|
|
6eeff56140 | ||
|
|
1b9334d000 | ||
|
|
b337c192c8 | ||
|
|
68ff9998a8 | ||
|
|
44b98ef4fc | ||
|
|
d1472cc25d | ||
|
|
295ab86116 | ||
|
|
f8ae8c81fb | ||
|
|
35108b2ba4 | ||
|
|
204d8b2dd9 | ||
|
|
0dba42d041 | ||
|
|
7ee58607a9 | ||
|
|
03bcf594c8 | ||
|
|
ec140956e8 | ||
|
|
a03a8ff15a | ||
|
|
4c6ba93328 | ||
|
|
c6430c2c2d |
@@ -10,7 +10,7 @@
|
||||
|
||||
**Webmin** is a web-based system administration tool for Unix-like servers, and services with over _1,000,000_ installations worldwide. Using it, it is possible to configure operating system internals, such as users, disk quotas, services or configuration files, as well as modify, and control open-source apps, such as BIND DNS Server, Apache HTTP Server, PHP, MySQL, and [many more](https://doxfer.webmin.com/Webmin/Introduction).
|
||||
|
||||
[](https://www.youtube.com/watch?v=daYG6O4AsEw&feature=emb_logo)
|
||||
[
|
||||
|
||||
Usability can be expanded by installing modules, which can be custom made. Aside from this, there are two other major projects that extend its functionality:
|
||||
|
||||
@@ -29,7 +29,7 @@ Webmin can be installed in two different ways:
|
||||
1. By downloading a pre-built package, available for different distributions (CentOS, Fedora, SuSE, Mandriva, Debian, Ubuntu, Solaris and [other](http://www.webmin.com/support.html)) from our [download page](http://webmin.com/download.html);
|
||||
<kbd>Note: It is highly recommended to [add repository](https://doxfer.webmin.com/Webmin/Installation) to your system for having automatic updates.</kbd>
|
||||
|
||||
2. By downloading, extracting [source file](https://prdownloads.sourceforge.net/webadmin/webmin-1.973.tar.gz), and running [_setup.sh_](http://www.webmin.com/tgz.html) script, with no arguments, which will setup to run it directly from this directory, or with a command-line argument, such as targeted directory.
|
||||
2. By downloading, extracting [source file](https://prdownloads.sourceforge.net/webadmin/webmin-1.974.tar.gz), and running [_setup.sh_](http://www.webmin.com/tgz.html) script, with no arguments, which will setup to run it directly from this directory, or with a command-line argument, such as targeted directory.
|
||||
<kbd>Note: If you are installing Webmin [on Windows](http://www.webmin.com/windows.html) system, you must run the command `perl setup.pl` instead. The Windows version depends on several programs, and modules that may not be part of the standard distribution. You will need _process.exe_ commmand, _sc.exe_ command, and _Win32::Daemon_ Perl module.</kbd>
|
||||
|
||||
## Documentation
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -26,6 +26,8 @@ print &ui_table_row($text{'sync_when'},
|
||||
"<br>\n".
|
||||
&ui_checkbox("delete", 1, $text{'sync_delete'}, $config{'sync_delete'}).
|
||||
"<br>\n".
|
||||
&ui_checkbox("modify", 1, $text{'sync_modify'}, $config{'sync_modify'}).
|
||||
"<br>\n".
|
||||
&ui_checkbox("unix", 1, $text{'sync_unix'}, $config{'sync_unix'}));
|
||||
|
||||
# Assign new users to group
|
||||
|
||||
@@ -306,6 +306,7 @@ sync_when=When to synchronize
|
||||
sync_create=Create a Webmin user when a Unix user is created.
|
||||
sync_update=Update the matching Webmin user when a Unix user is updated.
|
||||
sync_delete=Delete the matching Webmin user when a Unix user is deleted.
|
||||
sync_modify=Rename the matching Webmin user when a Unix user is renamed.
|
||||
sync_group=Assign new users to Webmin group
|
||||
sync_unix=Set password for new users to Unix authentication.
|
||||
sync_ecannot=You are not allowed to configure user synchronization.
|
||||
|
||||
@@ -12,6 +12,7 @@ $access{'sync'} && $access{'create'} && $access{'delete'} ||
|
||||
&lock_file("$module_config_directory/config");
|
||||
$config{'sync_create'} = $in{'create'};
|
||||
$config{'sync_delete'} = $in{'delete'};
|
||||
$config{'sync_modify'} = $in{'modify'};
|
||||
$config{'sync_unix'} = $in{'unix'};
|
||||
$config{'sync_group'} = $in{'group'};
|
||||
&write_file("$module_config_directory/config", \%config);
|
||||
|
||||
@@ -10,14 +10,15 @@ our (%config, $config_directory);
|
||||
# Create a new webmin user in the group
|
||||
sub useradmin_create_user
|
||||
{
|
||||
my ($unix) = @_;
|
||||
return if (!$config{'sync_create'});
|
||||
my $group = &get_group($config{'sync_group'});
|
||||
return if (!$group);
|
||||
my $clash = &get_user($_[0]->{'user'}) || &get_group($_[0]->{'user'});
|
||||
my $clash = &get_user($unix->{'user'}) || &get_group($unix->{'user'});
|
||||
return if ($clash);
|
||||
return if ($_[0]->{'user'} !~ /^[A-z0-9\-\_\.]+$/);
|
||||
my $user = { 'name' => $_[0]->{'user'},
|
||||
'pass' => $config{'sync_unix'} ? 'x' : $_[0]->{'pass'},
|
||||
return if ($unix->{'user'} !~ /^[A-z0-9\-\_\.]+$/);
|
||||
my $user = { 'name' => $unix->{'user'},
|
||||
'pass' => $config{'sync_unix'} ? 'x' : $unix->{'pass'},
|
||||
'sync' => 1,
|
||||
'modules' => $group->{'modules'} };
|
||||
&create_user($user);
|
||||
@@ -40,8 +41,9 @@ foreach my $m (@{$group->{'modules'}}, "") {
|
||||
# Delete this webmin user if in sync
|
||||
sub useradmin_delete_user
|
||||
{
|
||||
my ($unix) = @_;
|
||||
return if (!$config{'sync_delete'});
|
||||
my $u = &get_user($_[0]->{'user'});
|
||||
my $u = &get_user($unix->{'user'});
|
||||
if ($u) {
|
||||
&delete_user($u->{'name'});
|
||||
&reload_miniserv();
|
||||
@@ -62,35 +64,36 @@ foreach my $g (&list_groups()) {
|
||||
# Update this users password if in sync
|
||||
sub useradmin_modify_user
|
||||
{
|
||||
return if ($_[0]->{'passmode'} == 4 && $_[0]->{'olduser'} eq $_[0]->{'user'});
|
||||
my $u = &get_user($_[0]->{'olduser'});
|
||||
if ($u && $u->{'sync'}) {
|
||||
if ($_[0]->{'user'} ne $_[0]->{'olduser'}) {
|
||||
# New name might clash (or be invalid)
|
||||
my $clash = &get_user($_[0]->{'user'}) ||
|
||||
&get_group($_[0]->{'user'});
|
||||
my ($unix) = @_;
|
||||
return if ($unix->{'passmode'} == 4 && $unix->{'olduser'} eq $unix->{'user'});
|
||||
my $u = &get_user($unix->{'olduser'});
|
||||
if ($u && ($u->{'sync'} || $config{'sync_modify'})) {
|
||||
if ($unix->{'user'} ne $unix->{'olduser'}) {
|
||||
# User has been renamed .. but name might clash or be invalid
|
||||
my $clash = &get_user($unix->{'user'}) ||
|
||||
&get_group($unix->{'user'});
|
||||
return if ($clash);
|
||||
return if ($_[0]->{'user'} !~ /^[A-z0-9\-\_\.]+$/);
|
||||
return if ($unix->{'user'} !~ /^[A-z0-9\-\_\.]+$/);
|
||||
}
|
||||
$u->{'name'} = $_[0]->{'user'};
|
||||
if ($u->{'pass'} ne 'x') {
|
||||
$u->{'pass'} = $_[0]->{'passmode'} == 3 ?
|
||||
&encrypt_password($_[0]->{'plainpass'}) :
|
||||
$_[0]->{'pass'};
|
||||
$u->{'name'} = $unix->{'user'};
|
||||
if ($u->{'pass'} ne 'x' && $u->{'sync'}) {
|
||||
# Password has been updated
|
||||
$u->{'pass'} = $unix->{'passmode'} == 3 ?
|
||||
&encrypt_password($unix->{'plainpass'}) :
|
||||
$unix->{'pass'};
|
||||
}
|
||||
&modify_user($_[0]->{'olduser'}, $u);
|
||||
&modify_user($unix->{'olduser'}, $u);
|
||||
&reload_miniserv();
|
||||
}
|
||||
|
||||
|
||||
if ($_[0]->{'olduser'} && $_[0]->{'user'} ne $_[0]->{'olduser'}) {
|
||||
if ($unix->{'olduser'} && $unix->{'user'} ne $unix->{'olduser'}) {
|
||||
# Check other users' acl module acls
|
||||
foreach my $u (&list_users()) {
|
||||
my %uaccess = &get_module_acl($u->{'name'});
|
||||
my @au = split(/\s+/, $uaccess{'users'});
|
||||
my $idx = &indexof($_[0]->{'olduser'}, @au);
|
||||
my $idx = &indexof($unix->{'olduser'}, @au);
|
||||
if ($idx != -1) {
|
||||
$au[$idx] = $_[0]->{'user'};
|
||||
$au[$idx] = $unix->{'user'};
|
||||
$uaccess{'users'} = join(" ", @au);
|
||||
&save_module_acl(\%uaccess, $u->{'name'});
|
||||
}
|
||||
@@ -99,9 +102,9 @@ if ($_[0]->{'olduser'} && $_[0]->{'user'} ne $_[0]->{'olduser'}) {
|
||||
# Rename the user in his group
|
||||
foreach my $g (&list_groups()) {
|
||||
my @mems = @{$g->{'members'}};
|
||||
my $i = &indexof($_[0]->{'olduser'}, @mems);
|
||||
my $i = &indexof($unix->{'olduser'}, @mems);
|
||||
if ($i >= 0) {
|
||||
$mems[$i] = $_[0]->{'user'};
|
||||
$mems[$i] = $unix->{'user'};
|
||||
$g->{'members'} = \@mems;
|
||||
&modify_group($g->{'name'}, $g);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ our $module_name;
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
|
||||
# Check for python
|
||||
my $python = &get_python_cmd();
|
||||
my $python = &has_command("python2") || &has_command("python");
|
||||
if (!$python) {
|
||||
&ui_print_endpage(&text('index_epython', "<tt>python</tt>"));
|
||||
}
|
||||
|
||||
18
apache/config-Alma-Linux-7.0-ALL
Normal file
18
apache/config-Alma-Linux-7.0-ALL
Normal file
@@ -0,0 +1,18 @@
|
||||
show_list=0
|
||||
httpd_dir=/etc/httpd
|
||||
httpd_path=/usr/sbin/httpd
|
||||
mime_types=/etc/mime.types
|
||||
start_cmd=systemctl start httpd.service
|
||||
apply_cmd=systemctl reload httpd.service
|
||||
stop_cmd=systemctl stop httpd.service
|
||||
show_order=0
|
||||
max_servers=100
|
||||
test_config=1
|
||||
test_manual=0
|
||||
apachectl_path=/usr/sbin/apachectl
|
||||
test_always=0
|
||||
test_apachectl=1
|
||||
auto_mods=1
|
||||
show_names=0
|
||||
allow_virtualmin=0
|
||||
pid_file=/run/httpd/httpd.pid
|
||||
@@ -6,7 +6,7 @@ our (%config);
|
||||
sub list_atjobs
|
||||
{
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
opendir(my $DIR, $config{'at_dir'}) || return ();
|
||||
while(my $f = readdir($DIR)) {
|
||||
my $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^c(\S{5})(\S+)$/) {
|
||||
|
||||
@@ -5,7 +5,7 @@ use POSIX;
|
||||
sub list_atjobs
|
||||
{
|
||||
local @rv;
|
||||
opendir(DIR, $config{'at_dir'});
|
||||
opendir(DIR, $config{'at_dir'}) || return ();
|
||||
while($f = readdir(DIR)) {
|
||||
local $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^(\d+)\.a$/) {
|
||||
|
||||
@@ -6,7 +6,7 @@ our (%config);
|
||||
sub list_atjobs
|
||||
{
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
opendir(my $DIR, $config{'at_dir'}) || return ();
|
||||
while(my $f = readdir($DIR)) {
|
||||
my $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^a(\S{5})(\S+)$/) {
|
||||
|
||||
@@ -6,7 +6,7 @@ our %config;
|
||||
sub list_atjobs
|
||||
{
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
opendir(my $DIR, $config{'at_dir'}) || return ();
|
||||
while(my $f = readdir($DIR)) {
|
||||
my $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^a(\S+)\.(\d+)$/) {
|
||||
|
||||
@@ -5,7 +5,7 @@ use POSIX;
|
||||
sub list_atjobs
|
||||
{
|
||||
local @rv;
|
||||
opendir(DIR, $config{'at_dir'});
|
||||
opendir(DIR, $config{'at_dir'}) || return ();
|
||||
while($f = readdir(DIR)) {
|
||||
local $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^(\d+)\.a(\S+)$/) {
|
||||
|
||||
@@ -8,7 +8,7 @@ use POSIX;
|
||||
sub list_atjobs
|
||||
{
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
opendir(my $DIR, $config{'at_dir'}) || return ();
|
||||
while(my $f = readdir($DIR)) {
|
||||
my $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^(\d+)\.a$/) {
|
||||
|
||||
@@ -50,7 +50,8 @@ else {
|
||||
print "Content-type: application/x-gzip\n\n";
|
||||
my $buf;
|
||||
open(TEMP, "<$temp");
|
||||
while(read(TEMP, $buf, 1024)) {
|
||||
my $bs = &get_buffer_size();
|
||||
while(read(TEMP, $buf, $bs)) {
|
||||
print $buf;
|
||||
}
|
||||
close(TEMP);
|
||||
|
||||
@@ -417,9 +417,10 @@ return @rv;
|
||||
|
||||
# bacula_file_button(filesfield, [jobfield], [volume])
|
||||
# Pops up a window for selecting multiple files, using a tree-like view
|
||||
# Brackets around "window" are to hijack Authentic Theme replacement of popups with modals ("undefined")
|
||||
sub bacula_file_button
|
||||
{
|
||||
return "<input type=button onClick='ifield = form.$_[0]; jfield = form.$_[1]; chooser = window.open(\"treechooser.cgi?volume=".&urlize($_[2])."&files=\"+escape(ifield.value)+\"&job=\"+escape(jfield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbar=no,width=500,height=400\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
return "<input type=button onClick='ifield = form.$_[0]; jfield = form.$_[1]; chooser = (window).open(\"treechooser.cgi?volume=".&urlize($_[2])."&files=\"+escape(ifield.value)+\"&job=\"+escape(jfield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbar=no,width=500,height=400\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
}
|
||||
|
||||
sub tape_select
|
||||
|
||||
2
bacula-backup/jstree/jquery-3.6.0.min.js
vendored
Normal file
2
bacula-backup/jstree/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
bacula-backup/jstree/jstree.min.js
vendored
Normal file
6
bacula-backup/jstree/jstree.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
bacula-backup/jstree/themes/default-dark/32px.png
Normal file
BIN
bacula-backup/jstree/themes/default-dark/32px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
bacula-backup/jstree/themes/default-dark/40px.png
Normal file
BIN
bacula-backup/jstree/themes/default-dark/40px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
1146
bacula-backup/jstree/themes/default-dark/style.css
Normal file
1146
bacula-backup/jstree/themes/default-dark/style.css
Normal file
File diff suppressed because it is too large
Load Diff
1
bacula-backup/jstree/themes/default-dark/style.min.css
vendored
Normal file
1
bacula-backup/jstree/themes/default-dark/style.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
bacula-backup/jstree/themes/default-dark/throbber.gif
Normal file
BIN
bacula-backup/jstree/themes/default-dark/throbber.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
bacula-backup/jstree/themes/default/32px.png
Normal file
BIN
bacula-backup/jstree/themes/default/32px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
BIN
bacula-backup/jstree/themes/default/40px.png
Normal file
BIN
bacula-backup/jstree/themes/default/40px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
1102
bacula-backup/jstree/themes/default/style.css
Normal file
1102
bacula-backup/jstree/themes/default/style.css
Normal file
File diff suppressed because it is too large
Load Diff
1
bacula-backup/jstree/themes/default/style.min.css
vendored
Normal file
1
bacula-backup/jstree/themes/default/style.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
bacula-backup/jstree/themes/default/throbber.gif
Normal file
BIN
bacula-backup/jstree/themes/default/throbber.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -4,100 +4,149 @@
|
||||
$trust_unknown_referers = 1;
|
||||
require './bacula-backup-lib.pl';
|
||||
&ReadParse();
|
||||
print "Content-type: text/plain\n\n";
|
||||
|
||||
use JSON::PP;
|
||||
|
||||
# Input sanitization
|
||||
die "Illegal input" if ($in{'job'} and $in{'job'} !~ /^\d+\z/);
|
||||
|
||||
# Output the appropriate content-type
|
||||
if ($in{'fmt'} eq "json") {
|
||||
print "Content-type: application/json\n\n";
|
||||
}
|
||||
else {
|
||||
print "Content-type: text/plain\n\n";
|
||||
}
|
||||
|
||||
# Format the parent with ending slash if missing
|
||||
$d = ($in{'dir'} =~ /\/\z/) ? $in{'dir'} : $in{'dir'}."/";
|
||||
$wind = &unix_to_dos($d);
|
||||
|
||||
# Get the parent directory ID
|
||||
$dbh = &connect_to_database();
|
||||
$cmd = $dbh->prepare("select PathId from Path where Path = ?");
|
||||
$d = $in{'dir'} eq "/" ? "/" : $in{'dir'}."/";
|
||||
$wind = &unix_to_dos($d);
|
||||
$cmd = $dbh->prepare("SELECT PathId FROM Path WHERE Path = ?");
|
||||
$cmd->execute($wind);
|
||||
($pid) = $cmd->fetchrow();
|
||||
$cmd->finish();
|
||||
|
||||
if ($in{'job'} ne "") {
|
||||
$jobsql = "and Job.JobId = $in{'job'}";
|
||||
}
|
||||
if ($in{'job'}) {
|
||||
$jobsql = "AND Job.JobId = $in{'job'}";
|
||||
}
|
||||
|
||||
@nodes = ();
|
||||
|
||||
if ($in{'volume'}) {
|
||||
# Search just within one volume
|
||||
# Subdirectories of directory, that are on this volume
|
||||
$cmd1 = $dbh->prepare("
|
||||
select Path.Path
|
||||
from Path, File, Job, JobMedia, Media
|
||||
where File.PathId = Path.PathId
|
||||
and File.JobId = Job.JobId
|
||||
and Job.JobId = JobMedia.JobId
|
||||
and JobMedia.MediaId = Media.MediaId
|
||||
and Media.VolumeName = ?
|
||||
$jobsql
|
||||
");
|
||||
$cmd1->execute($in{'volume'}) || die "db error : ".$dbh->errstr;
|
||||
while(($f) = $cmd1->fetchrow()) {
|
||||
$f = &dos_to_unix($f);
|
||||
if ($f =~ /^(\Q$d\E[^\/]+\/)/) {
|
||||
push(@rv, $1);
|
||||
}
|
||||
}
|
||||
$cmd1->finish();
|
||||
$cmd = $dbh->prepare("
|
||||
SELECT DISTINCT Path.Path
|
||||
FROM Job, File, Path, JobMedia, Media
|
||||
WHERE Job.JobId = File.JobId
|
||||
AND Job.JobId = JobMedia.JobId
|
||||
AND File.PathId = Path.PathId
|
||||
AND JobMedia.MediaId = Media.MediaId
|
||||
AND Media.VolumeName = ?
|
||||
$jobsql
|
||||
ORDER BY Path.Path
|
||||
");
|
||||
|
||||
# Files in directory, that are on this volume
|
||||
$cmd2 = $dbh->prepare("
|
||||
select Filename.Name
|
||||
from File, Filename, Job, JobMedia, Media
|
||||
where File.FilenameId = Filename.FilenameId
|
||||
and File.PathId = ?
|
||||
and File.JobId = Job.JobId
|
||||
and Job.JobId = JobMedia.JobId
|
||||
and JobMedia.MediaId = Media.MediaId
|
||||
and Media.VolumeName = ?
|
||||
$jobsql
|
||||
");
|
||||
$cmd2->execute($pid, $in{'volume'}) || die "db error : ".$dbh->errstr;
|
||||
while(($f) = $cmd2->fetchrow()) {
|
||||
push(@rv, "$d$f") if ($f =~ /\S/);
|
||||
}
|
||||
$cmd2->finish();
|
||||
}
|
||||
$cmd->execute($in{'volume'}) || die "db error: ".$dbh->errstr;
|
||||
}
|
||||
else {
|
||||
# Search all files
|
||||
# Subdirectories of directory
|
||||
$cmd1 = $dbh->prepare("
|
||||
select Path
|
||||
from Path, File, Job
|
||||
where File.PathId = Path.PathId
|
||||
and File.JobId = Job.JobId
|
||||
$jobsql
|
||||
");
|
||||
$cmd1->execute() || die "db error : ".$dbh->errstr;
|
||||
while(($f) = $cmd1->fetchrow()) {
|
||||
$f = &dos_to_unix($f);
|
||||
if ($f =~ /^(\Q$d\E[^\/]+\/)/) {
|
||||
push(@rv, $1);
|
||||
}
|
||||
}
|
||||
$cmd1->finish();
|
||||
$cmd = $dbh->prepare("
|
||||
SELECT DISTINCT Path.Path
|
||||
FROM Job, File, Path
|
||||
WHERE Job.JobId = File.JobId
|
||||
AND File.PathId = Path.PathId
|
||||
$jobsql
|
||||
ORDER BY Path.Path
|
||||
");
|
||||
|
||||
# Files in directory
|
||||
$cmd2 = $dbh->prepare("
|
||||
select Filename.Name
|
||||
from File, Filename, Job
|
||||
where File.FilenameId = Filename.FilenameId
|
||||
and File.PathId = ?
|
||||
and File.JobId = Job.JobId
|
||||
$jobsql
|
||||
");
|
||||
$cmd2->execute($pid) || die "db error : ".$dbh->errstr;
|
||||
while(($f) = $cmd2->fetchrow()) {
|
||||
push(@rv, "$d$f") if ($f =~ /\S/);
|
||||
}
|
||||
$cmd2->finish();
|
||||
$cmd->execute() || die "db error: ".$dbh->errstr;
|
||||
}
|
||||
|
||||
# Push all folders direcly under the starting path
|
||||
while(($f) = $cmd->fetchrow()) {
|
||||
$f = &dos_to_unix($f);
|
||||
if ($f =~ /^(\Q$d\E([^\/]+)\/)/) {
|
||||
push(@rv, $1);
|
||||
}
|
||||
}
|
||||
|
||||
$cmd->finish();
|
||||
|
||||
@rv = &unique(@rv);
|
||||
|
||||
# Build the nodes structure for folders
|
||||
foreach $f (@rv) {
|
||||
$f =~ /([^\/]+)\/\Z/;
|
||||
push @nodes, {
|
||||
text => $1,
|
||||
fullpath => $f,
|
||||
children => JSON::PP::true,
|
||||
icon => "jstree-folder"
|
||||
};
|
||||
}
|
||||
|
||||
if ($in{'volume'}) {
|
||||
# Files in directory, that are on this volume
|
||||
$cmd = $dbh->prepare("
|
||||
SELECT Filename.Name
|
||||
FROM File, Filename, Job, JobMedia, Media
|
||||
WHERE File.FilenameId = Filename.FilenameId
|
||||
AND File.JobId = Job.JobId
|
||||
AND Job.JobId = JobMedia.JobId
|
||||
AND JobMedia.MediaId = Media.MediaId
|
||||
AND File.PathId = ?
|
||||
AND Media.VolumeName = ?
|
||||
$jobsql
|
||||
ORDER BY Filename.Name
|
||||
");
|
||||
|
||||
$cmd->execute($pid, $in{'volume'}) || die "db error: ".$dbh->errstr;
|
||||
}
|
||||
else {
|
||||
# Files in directory
|
||||
$cmd = $dbh->prepare("
|
||||
SELECT Filename.Name
|
||||
FROM Job, File, Filename
|
||||
WHERE Job.JobId = File.JobId
|
||||
AND File.FilenameId = Filename.FilenameId
|
||||
AND File.PathId = ?
|
||||
$jobsql
|
||||
ORDER BY Filename.Name
|
||||
");
|
||||
|
||||
$cmd->execute($pid) || die "db error: ".$dbh->errstr;
|
||||
}
|
||||
|
||||
# Push all the files in the starting path
|
||||
while(($f) = $cmd->fetchrow()) {
|
||||
if ($f =~ /\S/) {
|
||||
push(@rv, "$d$f");
|
||||
|
||||
# Build the nodes structure for files
|
||||
push @nodes, {
|
||||
text => $f,
|
||||
fullpath => "$d$f",
|
||||
children => JSON::PP::false,
|
||||
icon => "jstree-file"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$cmd->finish();
|
||||
|
||||
# Return output
|
||||
@rv = &unique(@rv);
|
||||
print "\n";
|
||||
foreach $f (@rv) {
|
||||
print $f,"\n";
|
||||
}
|
||||
|
||||
if($in{'fmt'} eq "json") {
|
||||
print JSON::PP->new->utf8->encode(\@nodes);
|
||||
}
|
||||
else {
|
||||
print "\n";
|
||||
foreach $f (@rv) {
|
||||
print $f,"\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +1,94 @@
|
||||
#!/usr/local/bin/perl
|
||||
# treechooser.cgi
|
||||
# Outputs HTML for a java file-chooser tree
|
||||
# Outputs HTML for a javascript file-chooser tree
|
||||
|
||||
require './bacula-backup-lib.pl';
|
||||
&PrintHeader();
|
||||
&ReadParse();
|
||||
|
||||
$shortest = "/";
|
||||
if ($main::session_id) {
|
||||
$session = "<param name=session value=\"sid=$main::session_id\">";
|
||||
}
|
||||
|
||||
$in{'job'} =~ s/^(.*)_(\d+)$/$2/g;
|
||||
print <<EOF;
|
||||
<html><head><title>$text{'tree_title'}</title><body>
|
||||
<html>
|
||||
<head>
|
||||
<title>$text{'tree_title'}</title>
|
||||
<link rel="stylesheet" href="jstree/themes/default/style.min.css" />
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
padding: 5px;
|
||||
}
|
||||
.main-container {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
height: 100%;
|
||||
}
|
||||
.spaced-button {
|
||||
margin: 5px;
|
||||
}
|
||||
#jstree {
|
||||
flex: 1;
|
||||
margin: 10px;
|
||||
margin-bottom: 0px;
|
||||
border: thin solid gray;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="main-container">
|
||||
<div id="jstree"></div>
|
||||
<div class="buttons">
|
||||
<button id="confirm" class="ui-button ui-widget ui-corner-all spaced-button">OK</button>
|
||||
<button id="cancel" class="ui-button ui-widget ui-corner-all spaced-button">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="jstree/jquery-3.6.0.min.js"></script>
|
||||
<script src="jstree/jstree.min.js"></script>
|
||||
|
||||
<script>
|
||||
function clear_files()
|
||||
{
|
||||
top.ifield.value = "";
|
||||
}
|
||||
\$("#cancel").click(function() {
|
||||
window.close();
|
||||
});
|
||||
|
||||
function add_file(file)
|
||||
{
|
||||
top.ifield.value = top.ifield.value + file + "\\n";
|
||||
}
|
||||
\$("#confirm").click(function() {
|
||||
let list = \$('#jstree').jstree(true).get_selected(true).map(n => n.original.fullpath).sort().reduce((a, v) => (a + '\\n' + v));
|
||||
\$(top.ifield).val(list);
|
||||
window.close();
|
||||
});
|
||||
|
||||
function finished()
|
||||
{
|
||||
window.close();
|
||||
}
|
||||
\$(function () {
|
||||
\$('#jstree').jstree({
|
||||
'plugins' : [ 'checkbox' ],
|
||||
'core' : {
|
||||
'animation': 100,
|
||||
'worker' : false,
|
||||
'force_text': true,
|
||||
'data' : {
|
||||
'url' : function (node) {
|
||||
const r = [];
|
||||
r.push('fmt=' + 'json');
|
||||
r.push('job=' + encodeURIComponent('$in{'job'}'));
|
||||
r.push('volume=' + encodeURIComponent('$in{'volume'}'));
|
||||
r.push('dir=' + ((node.id == '#') ? encodeURIComponent('$shortest') : encodeURIComponent(node.original.fullpath)));
|
||||
return 'list.cgi?' + r.join('&');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<applet code=TreeChooser name=TreeChooser width=100% height=100% MAYSCRIPT>
|
||||
<param name=volume value="$in{'volume'}">
|
||||
<param name=root value="$shortest">
|
||||
<param name=job value="$in{'job'}">
|
||||
$session
|
||||
</applet>
|
||||
</body></html>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
|
||||
240
bin/passwd
Executable file
240
bin/passwd
Executable file
@@ -0,0 +1,240 @@
|
||||
#!/usr/bin/env perl
|
||||
# passwd - change Webmin users password
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use 5.010;
|
||||
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
use Term::ANSIColor qw(:constants);
|
||||
|
||||
sub main
|
||||
{
|
||||
my %opt;
|
||||
GetOptions('help|h' => \$opt{'help'},
|
||||
'config|c=s' => \$opt{'config'},
|
||||
'user|u=s' => \$opt{'user'},
|
||||
'password|p=s' => \$opt{'password'});
|
||||
|
||||
# If username passed as regular param
|
||||
my $user = scalar(@ARGV) == 1 && $ARGV[0];
|
||||
|
||||
# Show usage
|
||||
pod2usage(0) if ($opt{'help'} || (!$opt{'user'} && !$user));
|
||||
|
||||
# Assign defaults
|
||||
$opt{'config'} ||= "/etc/webmin";
|
||||
$opt{'user'} = $user if ($user && !$opt{'user'});
|
||||
|
||||
# Catch kill signal
|
||||
my $sigkill = sub {
|
||||
system("stty echo");
|
||||
print "\n^C";
|
||||
print "\n";
|
||||
exit 1;
|
||||
};
|
||||
$SIG{INT} = \&$sigkill;
|
||||
|
||||
# Run change password command
|
||||
change_password(\%opt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
exit main(\@ARGV) if !caller(0);
|
||||
|
||||
sub change_password
|
||||
{
|
||||
my ($optref) = @_;
|
||||
my ($minserv_uconf_file, %lusers, @users, %uinfos, %ulines);
|
||||
my $user = $optref->{'user'};
|
||||
my $pass = $optref->{'password'};
|
||||
my $confdif = $optref->{'config'};
|
||||
my $conf = "$confdif/config";
|
||||
my $mconf = "$confdif/miniserv.conf";
|
||||
my $encrypt_password = sub {
|
||||
my ($pass, $gconfig) = @_;
|
||||
if ($gconfig->{'md5pass'} == 1) {
|
||||
|
||||
# Use MD5 encryption
|
||||
return &encrypt_md5($pass);
|
||||
} elsif ($gconfig->{'md5pass'} == 2) {
|
||||
|
||||
# Use SHA512 encryption
|
||||
return &encrypt_sha512($pass);
|
||||
} else {
|
||||
|
||||
# Use Unix DES
|
||||
srand(time() ^ $$);
|
||||
return crypt($pass, chr(int(rand(26)) + 65) . chr(int(rand(26)) + 65));
|
||||
}
|
||||
};
|
||||
my $conf_check = sub {
|
||||
my ($configs) = @_;
|
||||
foreach my $config (@{$configs}) {
|
||||
if (!-r $config) {
|
||||
say BRIGHT_RED, "Error: ", RESET, "Failed to read Webmin essential config file: ", BRIGHT_YELLOW, $config,
|
||||
RESET, " doesn't exist";
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
my $root = root($confdif, \&$conf_check);
|
||||
|
||||
# Load libs
|
||||
do "$root/acl/md5-lib.pl";
|
||||
do "$root/web-lib-funcs.pl";
|
||||
|
||||
# Check for main config and miniserv config files
|
||||
&$conf_check([$conf, $mconf]);
|
||||
|
||||
# Read and parse configs
|
||||
my (%config, %gconfig, %uconfig);
|
||||
read_file($mconf, \%config);
|
||||
read_file($conf, \%gconfig);
|
||||
$minserv_uconf_file = $config{'userfile'};
|
||||
|
||||
# Check for main user file
|
||||
&$conf_check([$minserv_uconf_file]);
|
||||
|
||||
# Read and parse `miniserv.users` config file
|
||||
read_file($minserv_uconf_file, \%lusers, undef, undef, ":");
|
||||
@users = keys %lusers;
|
||||
map {my @uinfo = split(':', "$lusers{$_}"); $uinfos{$_} = \@uinfo} @users;
|
||||
|
||||
# Check if user exists
|
||||
if (!defined($uinfos{$user})) {
|
||||
my $user_str = scalar(@users) > 1 ? 'users' : 'user';
|
||||
my $user_str2 = scalar(@users) > 1 ? 'are' : 'is';
|
||||
die(BRIGHT_RED, "Error: ", RESET . "Webmin user ",
|
||||
BRIGHT_YELLOW, $user, RESET, " doesn't exist. Existing Webmin $user_str on your system $user_str2 — ",
|
||||
BRIGHT_YELLOW, join(", ", sort(@users)),
|
||||
RESET, "\n");
|
||||
}
|
||||
|
||||
# Ask for password on stdin
|
||||
my $suc_pre_msg = "";
|
||||
my $suc_msg = 'updated successfully';
|
||||
if (!$pass) {
|
||||
print "Enter password for user ", BRIGHT_YELLOW, $user, RESET, ":";
|
||||
system("stty -echo");
|
||||
$pass = <STDIN>;
|
||||
system("stty echo");
|
||||
print "\nRetype new password:";
|
||||
system("stty -echo");
|
||||
my $pass2 = <STDIN>;
|
||||
system("stty echo");
|
||||
print "\n";
|
||||
|
||||
if ($pass ne $pass2) {
|
||||
say BRIGHT_RED, "Error: ", RESET, "Passwords do not match";
|
||||
exit 1;
|
||||
}
|
||||
chomp $pass;
|
||||
if (!$pass) {
|
||||
$suc_pre_msg = BOLD BRIGHT_RED ON_WHITE . 'Warning:' . RESET . " ";
|
||||
$suc_msg = "has been removed, enabling anyone to login without authentication";
|
||||
}
|
||||
}
|
||||
|
||||
# Update with new password and store timestamp
|
||||
$uinfos{$user}->[0] = &$encrypt_password($pass, \%gconfig);
|
||||
$uinfos{$user}->[5] = time() if ($uinfos{$user}->[5]);
|
||||
map {$ulines{$_} = join(":", @{ $uinfos{$_} })} keys %uinfos;
|
||||
|
||||
# Store original file first
|
||||
copy_source_dest($minserv_uconf_file, "$minserv_uconf_file-");
|
||||
|
||||
# Restart Webmin and write new user config file
|
||||
system("$confdif/stop >/dev/null 2>&1");
|
||||
write_file($minserv_uconf_file, \%ulines, ":");
|
||||
system("$confdif/start >/dev/null 2>&1");
|
||||
|
||||
# Print user message
|
||||
say "${suc_pre_msg}Password for Webmin user ", BRIGHT_YELLOW, $user, RESET, " $suc_msg";
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
sub root
|
||||
{
|
||||
my ($config, $conf_check) = @_;
|
||||
my $mconf = "$config/miniserv.conf";
|
||||
$conf_check->([$mconf]);
|
||||
open(my $CONF, "<", $mconf);
|
||||
my $root;
|
||||
while (<$CONF>) {
|
||||
if (/^root=(.*)/) {
|
||||
$root = $1;
|
||||
}
|
||||
}
|
||||
close($CONF);
|
||||
|
||||
# Does the Webmin root exist?
|
||||
if ($root) {
|
||||
die BRIGHT_RED, "Error: ", BRIGHT_YELLOW, $root, RESET, " is not a directory\n" unless (-d $root);
|
||||
} else {
|
||||
|
||||
# Try to guess where Webmin lives, since config file didn't know.
|
||||
die BRIGHT_RED, "Error: ", RESET, "Unable to determine Webmin installation directory\n";
|
||||
}
|
||||
|
||||
return $root;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
passwd
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This program allows you to change the password of a user in the Webmin password file
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
passwd [options]
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over
|
||||
|
||||
=item --help, -h
|
||||
|
||||
Print this usage summary and exit.
|
||||
|
||||
Examples of usage:
|
||||
|
||||
- passwd root
|
||||
|
||||
- passwd --user root
|
||||
|
||||
- passwd --user root --password ycwyMQRVAZY
|
||||
|
||||
- passwd --config /usr/local/etc/webmin --user root --password ycwyMQRVAZY
|
||||
|
||||
=item --config, -c
|
||||
|
||||
Specify the full path to the Webmin configuration directory. Defaults to C</etc/webmin>
|
||||
|
||||
=item --user, -u
|
||||
|
||||
Existing Webmin user to change password for
|
||||
|
||||
=item --password, -p
|
||||
|
||||
Set new user password. Using this option may be unsecure.
|
||||
|
||||
|
||||
|
||||
=back
|
||||
|
||||
=head1 LICENSE AND COPYRIGHT
|
||||
|
||||
Copyright 2021 Jamie Cameron <jcameron@webmin.com>
|
||||
Joe Cooper <joe@virtualmin.com>
|
||||
Ilia Rostovtsev <ilia@virtualmin.com>
|
||||
|
||||
@@ -15,7 +15,7 @@ use Cwd qw(cwd);
|
||||
my %opt;
|
||||
GetOptions('help|h' => \$opt{'help'},
|
||||
'product|p=s' => \$opt{'product'},
|
||||
'theme|p:s' => \$opt{'theme'});
|
||||
'theme|t:s' => \$opt{'theme'});
|
||||
pod2usage(0) if ($opt{'help'} || !$opt{'product'});
|
||||
|
||||
# Get current path
|
||||
|
||||
@@ -28,8 +28,12 @@ foreach my $z (@zones) {
|
||||
next if ($tv ne "master" && $tv ne "hint");
|
||||
my $file = &find_value("file", $z->{'members'});
|
||||
next if (!$file);
|
||||
my @recs = &read_zone_file($file, $z->{'value'});
|
||||
push(@rv, map { $_->{'file'} } @recs);
|
||||
if (&is_raw_format_records(&make_chroot($file))) {
|
||||
push(@rv, $file);
|
||||
}
|
||||
else {
|
||||
push(@rv, &files_in_zone_file($file));
|
||||
}
|
||||
}
|
||||
|
||||
return map { &make_chroot($_) } &unique(@rv);
|
||||
|
||||
@@ -3161,10 +3161,13 @@ my ($zone) = @_;
|
||||
my @rv;
|
||||
if (!$access{'ro'} && $access{'apply'}) {
|
||||
my $r = $ENV{'REQUEST_METHOD'} eq 'POST' ? 0 : 1;
|
||||
my $zone_name;
|
||||
my $link_params = "";
|
||||
if ($zone) {
|
||||
$zone_name = "&" . "zone=$zone->{'name'}&type=$zone->{'type'}";
|
||||
}
|
||||
$link_params = "&zone=$zone->{'name'}&type=$zone->{'type'}";
|
||||
if ($zone->{'viewindex'}) {
|
||||
$link_params .= "&view=$zone->{'viewindex'}";
|
||||
}
|
||||
}
|
||||
if (&is_bind_running()) {
|
||||
if ($zone && ($access{'apply'} == 1 || $access{'apply'} == 2)) {
|
||||
# Apply this zone
|
||||
@@ -3175,16 +3178,16 @@ if (!$access{'ro'} && $access{'apply'}) {
|
||||
}
|
||||
# Apply whole config
|
||||
if ($access{'apply'} == 1 || $access{'apply'} == 3) {
|
||||
push(@rv, &ui_link("restart.cgi?return=$r$zone_name", $text{'links_restart'}) );
|
||||
push(@rv, &ui_link("restart.cgi?return=$r$link_params", $text{'links_restart'}) );
|
||||
}
|
||||
if ($access{'apply'} == 1) {
|
||||
# Stop BIND
|
||||
push(@rv, &ui_link("stop.cgi?return=$r$zone_name", $text{'links_stop'}) );
|
||||
push(@rv, &ui_link("stop.cgi?return=$r$link_params", $text{'links_stop'}) );
|
||||
}
|
||||
}
|
||||
elsif ($access{'apply'} == 1) {
|
||||
# Start BIND
|
||||
push(@rv, &ui_link("start.cgi?return=$r$zone_name", $text{'links_start'}));
|
||||
push(@rv, &ui_link("start.cgi?return=$r$link_params", $text{'links_start'}));
|
||||
}
|
||||
}
|
||||
return join('<br>', @rv);
|
||||
|
||||
56
bind8/config-Alma-Linux-6.0-ALL
Normal file
56
bind8/config-Alma-Linux-6.0-ALL
Normal file
@@ -0,0 +1,56 @@
|
||||
soa_style=0
|
||||
named_path=/usr/sbin/named
|
||||
named_conf=/etc/named.conf
|
||||
show_list=0
|
||||
records_order=0
|
||||
start_cmd=service named start
|
||||
stop_cmd=service named stop
|
||||
max_zones=50
|
||||
rev_def=0
|
||||
support_aaaa=1
|
||||
allow_comments=0
|
||||
allow_wild=1
|
||||
allow_long=0
|
||||
master_ttl=1
|
||||
pid_file=/var/run/named.pid /run/named.pid
|
||||
whois_cmd=whois
|
||||
short_names=0
|
||||
updserial_def=0
|
||||
updserial_on=1
|
||||
updserial_man=1
|
||||
ndc_cmd=ndc
|
||||
forwardzonefilename_format=ZONE.hosts
|
||||
reversezonefilename_format=ZONE.rev
|
||||
rev_must=0
|
||||
ipv6_mode=1
|
||||
allow_underscore=1
|
||||
by_view=0
|
||||
confirm_zone=1
|
||||
confirm_rec=0
|
||||
no_chroot=0
|
||||
relative_paths=0
|
||||
rndc_cmd=rndc
|
||||
master_dir=/var/named
|
||||
slave_dir=/var/named/slaves
|
||||
no_pid_chroot=0
|
||||
soa_start=0
|
||||
rndc_conf=/etc/rndc.conf
|
||||
rndcconf_cmd=rndc-confgen
|
||||
largezones=0
|
||||
checkzone=named-checkzone
|
||||
keygen=dnssec-keygen
|
||||
signzone=dnssec-signzone
|
||||
checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
restart_cmd=restart
|
||||
keygen=dnssec-keygen
|
||||
tmpl_dnssec=0
|
||||
dnssec_period=21
|
||||
tmpl_dnssec_dt=1
|
||||
dnssectools_conf=/etc/dnssec-tools/dnssec-tools.conf
|
||||
dnssectools_rollrec=/var/named/system.rollrec
|
||||
dnssectools_keydir=/var/named/dtkeys
|
||||
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
@@ -53,3 +53,4 @@ dnssectools_keydir=/var/named/dtkeys
|
||||
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -46,3 +46,4 @@ other_slaves=1
|
||||
restart_cmd=restart
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -46,3 +46,4 @@ other_slaves=1
|
||||
restart_cmd=restart
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -37,3 +37,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -43,3 +43,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -42,3 +42,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -43,3 +43,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -40,3 +40,4 @@ other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
pid_file=/var/run/named/pid
|
||||
dnssec_info=1
|
||||
|
||||
@@ -40,3 +40,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -42,3 +42,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -40,3 +40,4 @@ other_slaves=1
|
||||
pid_file=/var/run/named/named.pid /private/var/run/named/named.pid
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -42,3 +42,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -42,3 +42,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -41,3 +41,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -41,3 +41,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -40,3 +40,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -41,3 +41,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -44,3 +44,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -41,3 +41,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -46,3 +46,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -46,3 +46,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -46,3 +46,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -42,3 +42,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -40,3 +40,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -42,3 +42,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -40,3 +40,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -40,3 +40,4 @@ checkconf=/usr/bin/named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -44,3 +44,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -45,3 +45,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -47,3 +47,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -34,3 +34,4 @@ updserial_def=0
|
||||
other_slaves=1
|
||||
updserial_man=1
|
||||
master_ttl=1
|
||||
dnssec_info=1
|
||||
|
||||
@@ -46,3 +46,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -46,3 +46,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -46,3 +46,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -39,3 +39,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -42,3 +42,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -40,3 +40,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -57,3 +57,4 @@ checkconf=named-checkconf
|
||||
other_slaves=1
|
||||
force_random=0
|
||||
spf_record=0
|
||||
dnssec_info=1
|
||||
|
||||
@@ -24,6 +24,7 @@ extra_forward=Extra record types for forward zones,0
|
||||
extra_reverse=Extra record types for reverse zones,0
|
||||
largezones=Show records in zones?,1,0-Yes,1-No (for large zones)
|
||||
default_view=Default view for new zones,3,First in list
|
||||
dnssec_info=Show DNSSEC expired zones on system information page?,1,1-Yes,0-No
|
||||
|
||||
line2=Zone file options,11
|
||||
soa_style=Serial number style,1,0-Running number,1-Date based (YYYYMMDDnn),2-Unix time
|
||||
|
||||
@@ -47,6 +47,7 @@ my @zones = grep { $_->{'type'} ne 'view' &&
|
||||
&can_edit_zone($_) &&
|
||||
(!$access{'ro'} || $_->{'name'} ne '.') } @allzones;
|
||||
my @views = grep { $_->{'type'} eq 'view' } @allzones;
|
||||
@views = sort { $a->{'name'} cmp $b->{'name'} } @views;
|
||||
my @hashint = grep { $_->{'type'} ne 'view' &&
|
||||
$_->{'name'} eq '.' } @allzones;
|
||||
|
||||
@@ -60,7 +61,7 @@ if (@zones == 1 && $access{'zones'} ne '*' && !$access{'defaults'} &&
|
||||
exit;
|
||||
}
|
||||
|
||||
my $chroot = &get_chroot();
|
||||
my $chroot = &get_chroot() || "";
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&restart_links().'<br>'.
|
||||
&help_search_link("bind", "doc", "google"), undef, undef,
|
||||
@@ -501,6 +502,8 @@ sub compare_zones
|
||||
my @sp0 = split(/\./, lc($_[0] || ""));
|
||||
my @sp1 = split(/\./, lc($_[1] || ""));
|
||||
for(my $i=0; $i<@sp0 || $i<@sp1; $i++) {
|
||||
$sp0[$i] = "" if (!defined($sp0[$i]));
|
||||
$sp1[$i] = "" if (!defined($sp1[$i]));
|
||||
if ($sp0[$i] =~ /^\d+$/ && $sp1[$i] =~ /^\d+$/) {
|
||||
return -1 if ($sp0[$i] < $sp1[$i]);
|
||||
return 1 if ($sp0[$i] > $sp1[$i]);
|
||||
|
||||
@@ -323,6 +323,24 @@ while($i < @tok) {
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# files_in_zone_file(file)
|
||||
# Quickly finds all includes in a zone file
|
||||
sub files_in_zone_file
|
||||
{
|
||||
my ($file) = @_;
|
||||
my @rv = ( $file );
|
||||
my $fh;
|
||||
open($fh, "<", $file);
|
||||
while(<$fh>) {
|
||||
if (/^\$include\s+(\S+)/) {
|
||||
my $inc = $1;
|
||||
push(@rv, &files_in_zone_file($inc));
|
||||
}
|
||||
}
|
||||
close($fh);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# create_record(file, name, ttl, class, type, values, comment)
|
||||
# Add a new record of some type to some zone file
|
||||
sub create_record
|
||||
|
||||
@@ -31,6 +31,9 @@ my $redir_targ = ($in{'type'} eq "master" ? "edit_master.cgi" :
|
||||
my $zone;
|
||||
if ($in{'zone'}) {
|
||||
$zone = "?zone=$in{'zone'}";
|
||||
}
|
||||
if ($in{'view'}) {
|
||||
$zone .= "&view=$in{'view'}";
|
||||
}
|
||||
}
|
||||
&redirect($zone && $in{'return'} ? "$redir_targ$zone" : "");
|
||||
|
||||
|
||||
@@ -18,10 +18,4 @@ my $err = &restart_zone($zone->{'name'}, $zone->{'view'});
|
||||
my $tv = $zone->{'type'};
|
||||
my $redir_targ = ($tv eq "master" ? "edit_master.cgi" :
|
||||
$tv eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi");
|
||||
if ($in{'return'}) {
|
||||
&redirect($redir_targ . "?zone=$in{'zone'}");
|
||||
}
|
||||
else {
|
||||
&redirect($redir_targ . "?zone=$in{'zone'}&view=$in{'view'}");
|
||||
}
|
||||
|
||||
&redirect($redir_targ . "?zone=$in{'zone'}&view=$in{'view'}");
|
||||
|
||||
@@ -17,6 +17,9 @@ my $redir_targ = ($in{'type'} eq "master" ? "edit_master.cgi" :
|
||||
my $zone;
|
||||
if ($in{'zone'}) {
|
||||
$zone = "?zone=$in{'zone'}";
|
||||
}
|
||||
if ($in{'view'}) {
|
||||
$zone .= "&view=$in{'view'}";
|
||||
}
|
||||
}
|
||||
&redirect($zone && $in{'return'} ? "$redir_targ$zone" : "");
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ my $redir_targ = ($in{'type'} eq "master" ? "edit_master.cgi" :
|
||||
my $zone;
|
||||
if ($in{'zone'}) {
|
||||
$zone = "?zone=$in{'zone'}";
|
||||
}
|
||||
if ($in{'view'}) {
|
||||
$zone .= "&view=$in{'view'}";
|
||||
}
|
||||
}
|
||||
&redirect($zone && $in{'return'} ? "$redir_targ$zone" : "");
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ sub list_system_info
|
||||
{
|
||||
my ($data, $in) = @_;
|
||||
my @rv;
|
||||
if (&foreign_available($module_name) && $access{'defaults'}) {
|
||||
if (&foreign_available($module_name) && $access{'defaults'} &&
|
||||
$config{'dnssec_info'}) {
|
||||
# Show DNSSEC client config errors
|
||||
my $err = &check_dnssec_client();
|
||||
if ($err) {
|
||||
@@ -14,7 +15,8 @@ if (&foreign_available($module_name) && $access{'defaults'}) {
|
||||
'warning' => $err });
|
||||
}
|
||||
}
|
||||
if (&foreign_available($module_name) && !$access{'noconfig'}) {
|
||||
if (&foreign_available($module_name) && !$access{'noconfig'} &&
|
||||
$config{'dnssec_info'}) {
|
||||
# Show DNSSEC expired domains
|
||||
my @exps = &list_dnssec_expired_domains();
|
||||
if (@exps) {
|
||||
|
||||
115
changepass.pl
115
changepass.pl
@@ -2,110 +2,24 @@
|
||||
# changepass.pl
|
||||
# Script for the user to change their webmin password
|
||||
|
||||
# Get Webmin directory
|
||||
my $cwd = $0;
|
||||
$cwd =~ s/(.*)\/.*/$1/;
|
||||
|
||||
# Check command line arguments
|
||||
require "./acl/md5-lib.pl";
|
||||
usage() if (@ARGV != 3);
|
||||
($config, $user, $pass) = @ARGV;
|
||||
if (!-d $config) {
|
||||
print STDERR "The config directory $config does not exist\n";
|
||||
exit 2;
|
||||
}
|
||||
if (!open(CONF, "<$config/miniserv.conf")) {
|
||||
print STDERR "Failed to open $config/miniserv.conf : $!\n";
|
||||
print STDERR "Maybe $config is not the Webmin config directory.\n";
|
||||
exit 3;
|
||||
}
|
||||
while(<CONF>) {
|
||||
if (/^([^=]+)=(\S+)/) { $config{$1} = $2; }
|
||||
}
|
||||
close(CONF);
|
||||
if (!open(CONF, "<$config/config")) {
|
||||
print STDERR "Failed to open $config/config : $!\n";
|
||||
print STDERR "Maybe $config is not the Webmin config directory.\n";
|
||||
exit 3;
|
||||
}
|
||||
while(<CONF>) {
|
||||
if (/^([^=]+)=(\S+)/) { $gconfig{$1} = $2; }
|
||||
}
|
||||
close(CONF);
|
||||
|
||||
# Update the users file
|
||||
if (!open(USERS, "<".$config{'userfile'})) {
|
||||
print STDERR "Failed to open Webmin users file $config{'userfile'} : $!\n";
|
||||
exit 4;
|
||||
}
|
||||
while(<USERS>) {
|
||||
s/\r|\n//g;
|
||||
local @user = split(/:/, $_);
|
||||
if (@user) {
|
||||
$users{$user[0]} = \@user;
|
||||
push(@users, $user[0]);
|
||||
my ($config, $user, $pass) = @ARGV;
|
||||
my $status = system("$cwd/bin/webmin passwd --config $config --user $user --pass $pass");
|
||||
if ($status != 0) {
|
||||
if ($! =~ /no such file/i) {
|
||||
print "Error: Webmin CLI command cannot be found\n";
|
||||
}
|
||||
else {
|
||||
print "Error: $!\n";
|
||||
}
|
||||
}
|
||||
close(USERS);
|
||||
$uinfo = $users{$user};
|
||||
if (!defined($uinfo)) {
|
||||
print STDERR "The Webmin user $user does not exist\n";
|
||||
print STDERR "The users on your system are: ",join(" ", @users),"\n";
|
||||
exit 5;
|
||||
}
|
||||
$uinfo->[1] = encrypt_password($pass);
|
||||
$uinfo->[6] = time();
|
||||
if (!open(USERS, ">$config{'userfile'}")) {
|
||||
print STDERR "Failed to open Webmin users file $config{'userfile'} : $!\n";
|
||||
exit 6;
|
||||
}
|
||||
foreach $v (values %users) {
|
||||
print USERS join(":", @$v),"\n";
|
||||
}
|
||||
close(USERS);
|
||||
print "Updated password of Webmin user $user\n";
|
||||
|
||||
# Send a signal to have miniserv reload it's config
|
||||
if (open(PID, "<".$config{'pidfile'})) {
|
||||
$pid = <PID>;
|
||||
$pid =~ s/\r|\n//;
|
||||
close(PID);
|
||||
if (!$pid) {
|
||||
print STDERR "Webmin is not running - cannot refresh configuration\n";
|
||||
}
|
||||
elsif (!kill('USR1', $pid)) {
|
||||
print STDERR "Failed to signal process $pid - cannot refresh configuration\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
print STDERR "Webmin is not running - cannot refresh configuration\n";
|
||||
}
|
||||
|
||||
sub encrypt_password
|
||||
{
|
||||
my ($pass) = @_;
|
||||
if ($gconfig{'md5pass'} == 1) {
|
||||
# Use MD5 encryption
|
||||
return &encrypt_md5($pass);
|
||||
}
|
||||
elsif ($gconfig{'md5pass'} == 2) {
|
||||
# Use SHA512 encryption
|
||||
return &encrypt_sha512($pass);
|
||||
}
|
||||
else {
|
||||
# Use Unix DES
|
||||
srand(time() ^ $$);
|
||||
$salt ||= chr(int(rand(26))+65).chr(int(rand(26))+65);
|
||||
return &unix_crypt($pass, $salt);
|
||||
}
|
||||
}
|
||||
|
||||
sub unix_crypt
|
||||
{
|
||||
local ($pass, $salt) = @_;
|
||||
if ($use_perl_crypt) {
|
||||
return Crypt::UnixCrypt::crypt($pass, $salt);
|
||||
}
|
||||
else {
|
||||
return crypt($pass, $salt);
|
||||
}
|
||||
}
|
||||
exit $status;
|
||||
|
||||
sub usage
|
||||
{
|
||||
@@ -115,9 +29,8 @@ usage: changepass.pl <config-dir> <login> <password>
|
||||
This program allows you to change the password of a user in the Webmin
|
||||
password file. For example, to change the password of the admin user
|
||||
to foo, you would run:
|
||||
changepass.pl /etc/webmin admin foo
|
||||
- changepass.pl /etc/webmin admin foo
|
||||
This assumes that /etc/webmin is the Webmin configuration directory.
|
||||
EOF
|
||||
exit 1;
|
||||
}
|
||||
|
||||
|
||||
16
dhcpd/config-Alma-Linux-7.0-ALL
Normal file
16
dhcpd/config-Alma-Linux-7.0-ALL
Normal file
@@ -0,0 +1,16 @@
|
||||
start_cmd=systemctl start dhcpd
|
||||
stop_cmd=systemctl stop dhcpd
|
||||
restart_cmd=service dhcpd restart
|
||||
dhcpd_conf=/etc/dhcp/dhcpd.conf
|
||||
dhcpd_path=/usr/sbin/dhcpd
|
||||
lease_file=/var/lib/dhcpd/dhcpd.leases
|
||||
lease_sort=0
|
||||
dhcpd_nocols=5
|
||||
lease_tz=0
|
||||
interfaces_type=redhat
|
||||
show_ip=0
|
||||
show_mac=0
|
||||
group_name=0
|
||||
display_max=100
|
||||
desc_name=0
|
||||
lease_vendor=0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user