/usr/share/usermin
NameSizeModeActions
at/-0755rm
authentic-theme/-0755rm
blue-theme/-0755rm
changepass/-0755rm
chfn/-0755rm
commands/-0755rm
cron/-0755rm
cshrc/-0755rm
fetchmail/-0755rm
filemin/-0755rm
filter/-0755rm
forward/-0755rm
gnupg/-0755rm
gray-theme/-0755rm
htaccess/-0755rm
htaccess-htpasswd/-0755rm
images/-0755rm
lang/-0755rm
language/-0755rm
mailbox/-0755rm
mailcap/-0755rm
man/-0755rm
mysql/-0755rm
plan/-0755rm
postgresql/-0755rm
proc/-0755rm
procmail/-0755rm
quota/-0755rm
schedule/-0755rm
shell/-0755rm
spam/-0755rm
ssh/-0755rm
theme/-0755rm
tunnel/-0755rm
twofactor/-0755rm
ulang/-0755rm
unauthenticated/-0755rm
updown/-0755rm
usermount/-0755rm
vendor_perl/-0755rm
xterm/-0755rm
acl_security.pl29590755editdlrm
chooser.cgi73870755editdlrm
config-aix2270644editdlrm
config-cobalt-linux2640644editdlrm
config-coherent-linux2640644editdlrm
config-corel-linux2640644editdlrm
config-debian-linux2640644editdlrm
config-freebsd2560644editdlrm
config-generic-linux2640644editdlrm
config-gentoo-linux2640644editdlrm
config-hpux2430644editdlrm
config-irix2840644editdlrm
config-lib.pl121200755editdlrm
config-macos2600644editdlrm
config-mandrake-linux2780644editdlrm
config-msc-linux2640644editdlrm
config-netbsd2830644editdlrm
config-open-linux2640644editdlrm
config-openbsd2410644editdlrm
config-openmamba-linux2640644editdlrm
config-openserver2360644editdlrm
config-osf12660644editdlrm
config-redhat-linux2640644editdlrm
config-slackware-linux2800644editdlrm
config-sol-linux2640644editdlrm
config-solaris4170644editdlrm
config-suse-linux2640644editdlrm
config-trustix-linux2640644editdlrm
config-turbo-linux2640644editdlrm
config-united-linux2640644editdlrm
config-unixware2860644editdlrm
copyconfig.pl44360755editdlrm
date_chooser.cgi22410755editdlrm
deb-name80644editdlrm
defaultacl980644editdlrm
defaulttheme160644editdlrm
entities_map.txt15010644editdlrm
favicon.ico150860644editdlrm
feedback.cgi65190755editdlrm
feedback_form.cgi35330755editdlrm
group_chooser.cgi76900755editdlrm
help.cgi23130755editdlrm
html-editor-lib.pl181470644editdlrm
index.cgi57810755editdlrm
install-module.pl13040755editdlrm
install-type40644editdlrm
javascript-lib.pl150420755editdlrm
lang_list.txt25700644editdlrm
LICENCE15160644editdlrm
LICENCE.ja16540644editdlrm
maketemp.pl4240755editdlrm
mime.types127130644editdlrm
miniserv.pem29690644editdlrm
miniserv.pl1894390755editdlrm
newmods.pl12800755editdlrm
oschooser.pl46550755editdlrm
os_list.txt358250644editdlrm
pam_login.cgi44290755editdlrm
password_change.cgi71920755editdlrm
password_form.cgi13270755editdlrm
perlpath.pl5710755editdlrm
README19720644editdlrm
robots.txt260644editdlrm
session_login.cgi52300755editdlrm
setup.sh268100755editdlrm
switch_user.cgi4040755editdlrm
thirdparty.pl17740755editdlrm
uconfig.cgi14280755editdlrm
uconfig_save.cgi14900755editdlrm
ui-lib.pl1159450755editdlrm
update-from-repo.sh151240755editdlrm
updateboot.pl24290755editdlrm
uptracker.cgi29560755editdlrm
usermin-init19270755editdlrm
usermin-pam1010644editdlrm
usermin-pam-osx2430644editdlrm
usermin-systemd4430644editdlrm
user_chooser.cgi75710755editdlrm
version60644editdlrm
web-lib-funcs.pl4051600755editdlrm
web-lib.pl9070755editdlrm
webmin-search-lib.pl96970755editdlrm
WebminCore.pm88730644editdlrm
webmin_search.cgi26970755editdlrm
Edit: /usr/share/usermin/update-from-repo.sh (15124B)
#!/usr/bin/env bash ############################################################################# # Update webmin/usermin to the latest develop version from GitHub repo # inspired by authentic-theme/theme-update.sh script, thanks @iliajie # VERS="1.6.10, 2023-11-16" # COPY=" Kay Marquardt https://github.com/gnadelwartz" ############################################################################# IAM=`basename $0` # don't ask -y given ASK="YES" if [[ "$1" == "-y" || "$1" == "-yes" || "$1" == "-f" || "$1" == "-force" ]] ; then ASK="NO" shift fi if [[ "$1" == "-nc" ]] ; then NCOLOR="YES" shift fi # predefined colors for echo -e on terminal if [[ -t 1 && "${NCOLOR}" != "YES" ]] ; then RED='\e[49;0;31;82m' BLUE='\e[49;1;34;182m' GREEN='\e[49;32;5;82m' ORANGE='\e[49;0;33;82m' PURPLE='\e[49;1;35;82m' LGREY='\e[49;1;37;182m' GREY='\e[1;30m' CYAN='\e[36m' NC='\e[0m' fi # Get webmin/usermin dir based on script's location DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PROD="webmin" # default if [[ -r "${DIR}/uconfig.cgi" ]] ; then if [[ -d "${DIR}/webmin" ]] ; then echo -e "${RED}Error: found Usermin but also Webmin files. aborting ...${NC}" exit 1 fi PROD="usermin" else if [[ -d "${DIR}/language" ]] ; then echo -e "${RED}Error: found Webmin but also Usermin files. aborting ...${NC}" exit 1 fi PROD="webmin" fi echo -e "${ORANGE}${PROD^} detected ...${NC}" # where to get source HOST="https://github.com" REPO="webmin/$PROD" GIT="git" CURL="curl" BRANCH="" # temporary locations for git clone WTEMP="${DIR}/.~files/webadmin" UTEMP="${DIR}/.~files/useradmin" TEMP=$WTEMP [[ "$PROD" == "usermin" ]] && TEMP=$UTEMP LTEMP="${DIR}/.~lang" # help requested output usage if [[ "$1" == "-h" || "$1" == "--help" ]] ; then if [[ "$1" != "--help" ]] ; then echo -e "${NC}${ORANGE}This is the webmin develop update script, ${VERS}${NC}" echo "Usage: ${IAM} [-force] [-repo:username/xxxmin] [-branch:xxx] [-release[:number]] [-file file|dir/ ...]" else cat </dev/null | grep ${PROD} | head -n 1` echo -e "${ORANGE}found: ${MINICONF}${NC} (alternative location)" fi # check if miniserv.conf found if [[ "${MINICONF}" != "" ]] ; then # add PATH from config to system PATH export PATH="${PATH}:`grep path= ${MINICONF} | sed 's/^path=//'`" ETC="`grep env_WEBMIN_CONFIG= ${MINICONF} | sed 's/^env_WEBMIN_CONFIG=//'`" echo -e "${ORANGE}Config path for ${PROD^} is: ${NC} ${ETC}" echo -e "${ORANGE}Install path for ${PROD^} is:${NC} ${DIR}\n" else echo -e "${RED}Error: found no miniserv configuration. aborting ...${NC}" exit 1 fi # check if PROD is in ETC and DIR if [[ "${ETC}" != *"${RPOD}"* || "${DIR}" != *"${RPOD}"* ]] ; then echo -e "${RED}Warning:${ORANGE} Config or Install path does not contain \"${PROD}\"!${NC} consider to ${ORANGE}NOT${NC} update!\n" WARNINGS="yes" fi # check if git is availible if type ${GIT} >/dev/null 2>&1 ; then true else echo -e "${RED}Error: Command \`git\` is not installed or not in the \`PATH\`. aborting ...${NC}" exit 3 fi # check if curl is availible if type ${CURL} >/dev/null 2>&1 ; then true else # flag as not availible, not needed without -repo or -release:latest CURL="" fi ################ # lets start # alternative repo given if [[ "$1" == "-repo"* ]]; then if [[ "$1" == *":"* ]] ; then REPO=${1##*:} if [[ "${REPO##*/}" != "webmin" && "${REPO##*/}" != "usermin" ]] ; then echo -e "${RED}Error: \"${REPO}\" is not a valid repository name! aborting ...${NC}" exit 1 fi if [[ "${REPO##*/}" != "${PROD}" ]] ; then echo -e "${RED}Error: \"${REPO}\" is not a valid ${PROD^} repository name! aborting ...${NC}" exit 1 fi shift else echo -e "${RED}Error: Missing argument for parameter \"-repo\". aborting ...${NC}" exit 1 fi fi # alternative branch given if [[ "$1" == *"-branch"* ]]; then if [[ "$1" == *":"* ]] ; then BRANCH=" --branch ${1##*:}" shift else echo -e "${ORANGE}./`basename $0`:${NC} Missing argument for parameter -branch aborting ..." exit 1 fi fi # warn about possible side effects because webmins makedist.pl try cd to /usr/local/webmin (and more) [[ -d "/usr/local/webadmin" ]] && echo -e "${RED}Warning:${ORANGE} Develop dir /usr/local/webadmin exist, update may fail!${NC}" ################ # really update? REPLY="y" if [ "${ASK}" == "YES" ] ; then if [[ "$1" != "-release"* ]] ; then echo -e "${RED}Warning:${ORANGE} you are updating from DEV repository${NC} ${HOST}/${REPO}${BRANCH} ${ORANGE}, this may break your installation!${NC}" fi read -p "Would you like to update "${PROD^}" from ${HOST}/${REPO}${BRANCH} [y/N] " -n 1 -r echo fi if [[ ! $REPLY =~ ^[Yy]$ ]]; then # something different the y entered echo -e "${PURPLE}Operation aborted.${NC}" exit 1 fi ################ # here we go # Enter to the dir first - important if run from different location cd ${DIR} # remove temporary files from failed run rm -rf .~files # pull source from github if [[ "$1" == *"-release"* ]]; then if [[ "$1" == *":"* ]] && [[ "$1" != *"latest"* ]]; then RRELEASE=${1##*:} elif [[ "${CURL}" != "" ]] ; then RRELEASE="$(${CURL} -s -L https://raw.githubusercontent.com/${REPO}/master/version)" else echo -e "${RED}Error: Command \`curl\` is not installed or not in the \`PATH\`.${NC} try with -release:1.881" exit 3 fi shift echo -e "${CYAN}Pulling in latest release of${NC} ${ORANGE}${PROD^}${NC} $RRELEASE ($HOST/$REPO)..." RS="$(${GIT} clone --depth 1 --branch $RRELEASE -q $HOST/$REPO.git "${TEMP}" 2>&1)" if [[ "$RS" == *"ould not find remote branch"* ]]; then ERROR="Release ${RRELEASE} doesn't exist. " fi else echo -e "${CYAN}Pulling in latest changes for${NC} ${ORANGE}${PROD^}${NC} $RRELEASE (${HOST}/${REPO}${BRANCH}) ..." ${GIT} clone --depth 1 --quiet ${BRANCH} $HOST/$REPO.git "${TEMP}" fi # on usermin!! pull also webmin to resolve symlinks later! WEBMREPO=`echo ${REPO} | sed "s/\/usermin$/\/webmin/"` if [[ "${REPO}" != "${WEBMREPO}" ]]; then echo -e "${CYAN}Pulling also latest changes for${NC} ${ORANGE}Webmin${NC} ($HOST/$WEBMREPO) ..." ${GIT} clone --depth 1 --quiet $HOST/$WEBMREPO.git "${WTEMP}" fi # Check for possible errors if [ $? -eq 0 ] && [ -f "${TEMP}/version" ]; then #################### # start processing pulled source # add latest changeset date to original version, works with git 1.7+ if [[ "${RRELEASE}" == "" ]] ; then version="`head -n 1 ${TEMP}/version``cd ${TEMP}; ${GIT} log -n1 --pretty='format:%cd' --date=format:'%m%d%H%M'`" else version="${RRELEASE}" fi DOTVER=`echo ${version} | sed 's/-/./'` TARBALL="${TEMP}/tarballs/${PROD}-${DOTVER}" ############### # start update echo -en "${CYAN}Start update for${NC} ${PROD^} ${version}..." # create missing dirs, simulate authentic present mkdir ${TEMP}/tarballs ${TEMP}/authentic-theme cp authentic-theme/LICENSE ${TEMP}/authentic-theme # put dummy clear and tar in PATH echo -e "#!/bin/sh\necho" > ${TEMP}/clear; chmod +x ${TEMP}/clear echo -e "#!/bin/sh\necho" > ${TEMP}/tar; chmod +x ${TEMP}/tar export PATH="${TEMP}:${PATH}" # run makedist.pl ( cd ${TEMP}; perl makedist.pl ${DOTVER} 2>&1) | while read input; do echo -n "."; done echo -e "\n" if [[ ! -f "${TARBALL}.tar.gz" ]] ; then echo -e "${RED}Error: makedist.pl failed! ${NC}aborting ..." rm -rf .~files exit 5 fi rm -rf ${TEMP}/tar # check for additional standard modules not in default dist for module in `ls */module.info` do if [[ -f ${TEMP}/${module} && ! -f "${TARBALL}/$module" ]]; then module=`dirname $module` echo -e "${CYAN}Adding nonstandard${NC} ${ORANGE}$module${NC} to ${PROD^}" cp -r -L ${TEMP}/${module} ${TARBALL}/ fi done # insert perl path config_dir=`grep env_WEBMIN_CONFIG= ${MINICONF}| sed 's/.*_WEBMIN_CONFIG=//'` perl=`cat $config_dir/perl-path` echo -e "${CYAN}Insert perl path${NC} ${perl} ..." ( cd ${TARBALL}; sed -i --follow-symlinks "1 s|#\!/.*$|#!${perl}|" `find . -name '*.cgi' ; find . -name '*.pl'` ) # copy all or only given files ... if [[ "$1" != "-file" ]] ; then ############ # prepeare unattended FULL upgrade echo "${version}" >"${TARBALL}/version" atboot="NO" makeboot="NO" nouninstall="YES" [[ -x "${perl}" ]] && noperlpath="YES" #nostart="YES" export config_dir atboot nouninstall makeboot nostart noperlpath ( cd ${TARBALL}; ./setup.sh ${DIR} ) | grep -v -e "^$" -e "done$" -e "chmod" -e "chgrp" -e "chown" if [[ "${TARBALL}/version" -nt "${MINICONF}" ]] ; then echo -e "${RED}Error: update failed, ${PROD} may in a bad state! ${NC}aborting ..." rm -rf .~files exit 6 fi # run authenric-thme update, possible unattended if [[ -x authentic-theme/theme-update.sh ]] ; then if [[ "${ASK}" == "YES" ]] ; then authentic-theme/theme-update.sh else yes | authentic-theme/theme-update.sh fi fi else ################## # pull specified files only shift FILES="$*" for file in ${FILES} do # check for / and ../ if [[ "${file}" == "/"* || "${file}" == *"../"* ]] ; then echo -e "${RED}Warning:${ORANGE} / and ../ are not allowed!${NC} skipping ${file} ..." WARNINGS="yes" continue fi if [[ "$file" == *"/" && -d "${TARBALL}/${file}" ]] ; then echo -e "${BLUE}Copy dir ${ORANGE}${file}${NC} from ${ORANGE}${REPO}${NC} to ${PROD^} ..." dest=${file%%/*} [[ "${dest}" == "${file}" ]] && dest="." cp -r "${TARBALL}/${file}" "${dest}" | sed 's/^.*\/tarballs\///' FOUND="${FOUND}${file} " else if [ -f "${TARBALL}/${file}" ] ; then echo -e "${CYAN}Copy file ${ORANGE}${file}${NC} from ${ORANGE}${REPO}${NC} to ${PROD^} ..." mv "${file}" "${file}.bak" cp "${TARBALL}/${file}" "${file}" if [[ "$?" -eq "0" ]] ; then rm -rf "${file}.bak" else echo -e "${RED}Warning:${ORANGE} cp ${file} failed,${NC} restore original!" WARNINGS="yes" fi FOUND="${FOUND}${file} " elif [[ ! -d "${TARBALL}/${file}" ]] ; then echo -e "${RED}Warning:${ORANGE} No such file or directory: ${file},${NC} skipping ..." WARNINGS="yes" fi fi done FILES='$*' # restart webmin if [[ -d "${ETC}" ]] ; then echo ${ETC}/restart fi fi else # something went wrong echo -e "${RED}${ERROR} Error: update failed:${NC}${ORANGE} ${GIT} clone ${BRANCH} $RRELEASE $HOST/$REPO.git ${NC}" exit 4 fi ########### # we are at the end, clean up # remove temporary files echo -e "\n${CYAN}Clean up temporary files ...${NC}" rm -rf .~files # fix permissions, should be done by makedist.pl? echo -e "${CYAN}Make scripts executable ...${NC}" chmod -R +X ${DIR} chmod +x *.pl *.cgi *.pm *.sh */*.pl */*.cgi */*.pm */*.sh # thats all folks [[ "${WARNINGS}" != "" ]] && WARNINGS="(with warnings)" echo -e "\n${CYAN}Updating ${PROD^} ${ORANGE}${FOUND}${NC} to Version `cat version`, done ${RED}${WARNINGS}${NC}" # update success exit 0