We must ideally create a file to do this so that we can use this multiple times.
Below are the steps.
- Create a file, say name it as unlockusers.sh.
- Paste the below content into the file.
ldapmodify -p 389 -h servername.corp.company.com -D cn=orcladmin -w password -x -v <<EOF
dn: cn=username, cn=Users,dc=corp,dc=company,dc=com
changetype: modify
add: orclpwdaccountunlock
orclpwdaccountunlock: 1
EOF Save and close the file. Give execute permission on that new file
chmod +x unlockuser.shExecute the file like
./unlockusers.sh
Next time on, all you need to do is change the username and execute the file.
No comments:
Post a Comment