mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
dox2unix fix after merge
This commit is contained in:
parent
6e0aba66e0
commit
b8b28120fd
231 changed files with 20776 additions and 20776 deletions
|
@ -1,57 +1,57 @@
|
|||
#!/bin/bash
|
||||
# info: change user password
|
||||
# options: USER PASSWORD
|
||||
#
|
||||
# The function changes user's password and updates RKEY value.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
user=$1
|
||||
password=$2
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
# Hiding password
|
||||
A2="******"
|
||||
EVENT="DATE='$DATE' TIME='$TIME' CMD='$SCRIPT' A1='$A1' A2='$A2' A3='$A3'"
|
||||
EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'"
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '2' "$#" 'USER PASSWORD'
|
||||
validate_format 'user' 'password'
|
||||
is_object_valid 'user' 'USER' "$user"
|
||||
is_object_unsuspended 'user' 'USER' "$user"
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Changing user password
|
||||
echo "$password" | /usr/bin/passwd "$user" --stdin &>/dev/null
|
||||
md5=$(awk -v user=$user -F : 'user == $1 {print $2}' /etc/shadow)
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Changing RKEY value
|
||||
update_user_value "$user" '$RKEY' "$(gen_password)"
|
||||
update_user_value "$user" '$MD5' "$md5"
|
||||
|
||||
# Logging
|
||||
log_history "changed password"
|
||||
log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
||||
#!/bin/bash
|
||||
# info: change user password
|
||||
# options: USER PASSWORD
|
||||
#
|
||||
# The function changes user's password and updates RKEY value.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
user=$1
|
||||
password=$2
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
# Hiding password
|
||||
A2="******"
|
||||
EVENT="DATE='$DATE' TIME='$TIME' CMD='$SCRIPT' A1='$A1' A2='$A2' A3='$A3'"
|
||||
EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'"
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '2' "$#" 'USER PASSWORD'
|
||||
validate_format 'user' 'password'
|
||||
is_object_valid 'user' 'USER' "$user"
|
||||
is_object_unsuspended 'user' 'USER' "$user"
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Changing user password
|
||||
echo "$password" | /usr/bin/passwd "$user" --stdin &>/dev/null
|
||||
md5=$(awk -v user=$user -F : 'user == $1 {print $2}' /etc/shadow)
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Changing RKEY value
|
||||
update_user_value "$user" '$RKEY' "$(gen_password)"
|
||||
update_user_value "$user" '$MD5' "$md5"
|
||||
|
||||
# Logging
|
||||
log_history "changed password"
|
||||
log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue