ssh key change file name had .sh.sh extension
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
# check if we need to move the users authorized keys to the central location
|
||||
|
||||
TEST=1;
|
||||
LIST=0;
|
||||
SKIP_USERS=();
|
||||
while getopts ":gs:" opt; do
|
||||
while getopts ":gls:" opt; do
|
||||
case "${opt}" in
|
||||
g|go)
|
||||
# default we
|
||||
@@ -13,6 +14,9 @@ while getopts ":gs:" opt; do
|
||||
s|skip)
|
||||
SKIP_USERS+=("${OPTARG}");
|
||||
;;
|
||||
l|list)
|
||||
LIST=1;
|
||||
;;
|
||||
\?)
|
||||
echo -e "\n Option does not exist: ${OPTARG}\n";
|
||||
echo "Use -g for go (run) and -s <user> for users to skip";
|
||||
@@ -55,6 +59,12 @@ fi;
|
||||
echo "SSH Msater Authorized Key file: ${SSH_MASTER_AUTHORIZED_FILE}";
|
||||
echo "SSH Authorized Keys file folder: ${SSH_CENTRAL_AUTHORIZED_FILE_FOLDER}";
|
||||
|
||||
if [ ${LIST} -eq 1 ];
|
||||
ls -l "${SSH_CENTRAL_AUTHORIZED_FILE_FOLDER}";
|
||||
lsattr "${SSH_CENTRAL_AUTHORIZED_FILE_FOLDER}";
|
||||
exit;
|
||||
then;
|
||||
|
||||
PRINTF_INFO="%-8s [%3s]: %-25s: %s\n";
|
||||
# list of user accounts we will never touch
|
||||
NO_ACTION=(root);
|
||||
Reference in New Issue
Block a user