Create set_passwd_expire _0.sh
This commit is contained in:
parent
239035d8a2
commit
9ade26f0f9
53
SHELL/TSM/set_passwd_expire _0.sh
Normal file
53
SHELL/TSM/set_passwd_expire _0.sh
Normal file
@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
# TITRE set_passwd_expire_0.sh
|
||||
# DESCRIPTION : Passage de l'expiration du mot de passe des nodes à 0
|
||||
# HISTORIQUE :
|
||||
# T | Date | Auteur | Description
|
||||
#---+------------+------------------------------+------------------------------------
|
||||
# A | 29/06/22 | Demonic | Création
|
||||
# -----------------------------------------------------------------------------------
|
||||
|
||||
# LOGGING
|
||||
# exec > ./log/set_passwd_expire_0_tsm.log 2>&1
|
||||
|
||||
#########################################
|
||||
## DECLARATION DES VARIABLES ##
|
||||
#########################################
|
||||
|
||||
_HOME_PATH="$(cd $(dirname $0) && pwd)"
|
||||
_SCRIPT_PATH="$_HOME_PATH/$(basename $0)"
|
||||
|
||||
LIST="$_HOME_PATH/listnode.txt"
|
||||
|
||||
. $_HOME_PATH/environment
|
||||
|
||||
#########################################
|
||||
## DEFINITION FONCTIONS ##
|
||||
#########################################
|
||||
|
||||
tsmcmd(){
|
||||
dsmadmc -id=$ID -pa=$PASSWD -datao=yes $*
|
||||
return $?
|
||||
}
|
||||
|
||||
#########################################
|
||||
## PROGRAMME PRINCIPAL ##
|
||||
#########################################
|
||||
|
||||
#while read node
|
||||
for node in $(cat $LIST)
|
||||
do
|
||||
wait 5s
|
||||
echo " "
|
||||
echo "****************************************"
|
||||
echo "`date '+%d_%m_%Y'` à `date '+%H:%M:%S'`"
|
||||
echo "pass exp to 0 for $node"
|
||||
echo "****************************************"
|
||||
|
||||
tsmcmd set passexp 0 node=$node
|
||||
CR=$?
|
||||
|
||||
done
|
||||
|
||||
tsmcmd update admin admin sessionsec=trans
|
Loading…
Reference in New Issue
Block a user