how to enable linux support users for a certain no of hrs using php -
i want enable linux support user 8 hours , lock login automatically.
front end built using php , below have used ..
// enabling support shell_exec("sudo passwd -u support"); // time expire $date = date("h:i:s a", strtotime('+8 hours')); $timeat = substr($date,0,2).substr($date,9,11); // cron setup using 'at' command shell_exec("sudo @ ".$timeat." -f /path/to/cron/disablesupport.php");
disablesupport.php has below code.
//locking support shell_exec("passwd -l support");
this didn't work. please fix , me solution.
revise php.ini file custom time configuration.
for ubuntu, /etc/php5/apache2/php.ini file should revised.
change line: session.gc_maxlifetime=28800
(28800 seconds = 8 hours)
Comments
Post a Comment