Page 1 of 1
Demo Account Setup
Posted: Thu Aug 14, 2014 7:42 am
by inerd
This lil cron will change your demo account password every minute so people can access it anytime without manually changing the password. I have a working example below. Works on CentOS but dont know about Ubuntu or Debian
How to: (Please setup up a demo account for this to work)
1.) Login into VestaCP using your admin account
2.) Go to the Cron section
3.) Click on Add Cron Job
4.) Enter the following data:
Minute: */1
Hour: *
Day: *
Month: *
Day of Week: *
Command: sudo /usr/local/vesta/bin/v-change-user-password demo demo123
5.) Then save the cron and see the magic :)
A Working Example:
Control Panel Login:
https://vps.flectsoft.co.uk:8083/
Username: demo
Password: demo123
Change the password to anything, anytime of the day then within 1 minute it will change back within 1 minute due to a cron setup
Re: Demo Account Setup
Posted: Sat May 02, 2015 9:12 am
by hafeezksa
There is error as below: (centos 6)
Cron: sudo /usr/local/vesta/bin/v-change-user-password demo demo123
"/usr/local/vesta/bin/v-change-user-password: line 17: /func/main.sh: No such file or directory
/usr/local/vesta/bin/v-change-user-password: line 18: /conf/vesta.conf: No such file or directory
/usr/local/vesta/bin/v-change-user-password: line 29: check_args: command not found
/usr/local/vesta/bin/v-change-user-password: line 30: validate_format: command not found
/usr/local/vesta/bin/v-change-user-password: line 31: is_object_valid: command not found
/usr/local/vesta/bin/v-change-user-password: line 32: is_object_unsuspended: command not found
/usr/local/vesta/bin/v-change-user-password: line 49: gen_password: command not found
/usr/local/vesta/bin/v-change-user-password: line 49: update_user_value: command not found
/usr/local/vesta/bin/v-change-user-password: line 50: update_user_value: command not found
/usr/local/vesta/bin/v-change-user-password: line 53: log_history: command not found
/usr/local/vesta/bin/v-change-user-password: line 54: log_event: command not found"
Re: Demo Account Setup
Posted: Tue May 05, 2015 1:36 pm
by skurudo
hafeezksa wrote:There is error as below: (centos 6)
Cron: sudo /usr/local/vesta/bin/v-change-user-password demo demo123
Check sudoers and user there (can he sudo or not)
Re: Demo Account Setup
Posted: Wed May 06, 2015 4:40 pm
by hafeezksa
Yes, this command is working manually using sudo but using vesta cron I received above error in my email from system.
Re: Demo Account Setup
Posted: Wed May 06, 2015 5:16 pm
by skurudo
Code: Select all
export VESTA=/usr/local/vesta/;sudo /usr/local/vesta/bin/v-change-user-password demo demo123
Try this command
Re: Demo Account Setup
Posted: Wed May 06, 2015 5:33 pm
by hafeezksa
skurudo wrote:Code: Select all
export VESTA=/usr/local/vesta/;sudo /usr/local/vesta/bin/v-change-user-password demo demo123
Try this command
Thanks, It is working without any problem.
Re: Demo Account Setup
Posted: Wed May 06, 2015 6:11 pm
by skurudo
hafeezksa wrote:
Thanks, It is working without any problem.
Ok, it's good to hear.