Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ "$1" == "" ]
- then
- echo "SID must be first parameter"
- exit 1
- fi
- LCDB=$(echo $2 | awk '{print tolower($0)}')
- if [ "$LCDB" != "db2" ]
- then
- echo "Supported DB must be second parameter"
- exit 1
- fi
- LCSID=$(echo $1 | awk '{print tolower($0)}')
- UCSID=$(echo $1 | awk '{print toupper($0)}')
- SIDADM=${LCSID}adm
- DBUSER=${LCDB}${LCSID}
- SCHEMAUSER="sapr3"
- echo $LCSID $UCSID $SIDADM $SCHEMAUSER $DBUSER
- USERLIST="$SIDADM $SCHEMAUSER $DBUSER"
- for USER in $USERLIST
- do
- set -x
- chage -l $USER
- chage -M 9999 $USER
- chage -E 1 $USER
- chage -l $USER
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement