Wednesday, February 21, 2018

How to change Password by using sh script

Please find below script For change password automatic . set below script in crontab

Create new file .sh

vim  /home/Alert/pass.sh

Enter below line in .sh file

#!/bin/bash
# Change password echo -e "Password\nPassword" | passwd username

Set permission for .sh file

chmod 777 /home/Alert/pass.sh


set script in crontab :-


45 10 * * * /bin/sh /home/Alert/pass.sh


Done

No comments:

Post a Comment

Installation FreeRADIUS and Daloradius on CentOS 7 and RHEL 7

SELINUX Setting:- Before installations, I recommend turning off SELinux or setting it in permissive mode:- [root@radius ~]# setenforce ...

Popular Posts