[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 580: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 636: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4511: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3257)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4511: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3257)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4511: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3257)
SELinux Super Administrator Forum • Create Web passwords without complexity
Page 1 of 1

Create Web passwords without complexity

Posted: Tue May 23, 2017 10:43 am
by micklang
Well, we're already authenticated, so why have a complex password just to web browse?

The below script will allow you to create simple (short) passwords to make it easier for you or your users to authenticate via web browser. **Note: this should not be used for external accounts that web browse in.

Launch this at SystemLow after creating new user accounts.

Create this script in /opt/j**x/site-scripts and make executable.

#!/bin/bash

passwdfile="/etc/opt/Apache/passwords"
context=`id -Z | cut -d ':' -f 4`

if [ $context != "SystemLow!" ]; then
echo "You can only run this from a SystemLow terminal."
echo " ";
exit;
fi

echo "Webpass - used to add/change passwords for the Web interface.";
echo " ";
echo "Enter the user's name:";
echo " ";
read username;
echo " ";
echo "Enter the desired password: (note: it cannot be null)";
echo " ";
read password;
echo "Creating password entry for $username...";
echo " ";
/opt/Apache/bin/htpasswd -b $passwdfile $username $password