Click here to Skip to main content
15,881,588 members

Comments by Member 10390715 (Top 78 by date)

Member 10390715 13-Mar-17 3:36am View    
Thanks you. And this is my solve. I enable SSH by root user.
open sshd configuration file /etc/ssh/sshd_config and change line:
FROM:
PermitRootLogin prohibit-password
TO:
PermitRootLogin yes
And I don't need use "sudo"
Member 10390715 2-Mar-17 3:56am View    
Ok, I understand. But now I have edit sudoers file to
apache ALL=(root) NOPASSWD: /usr/local/bin/reboot.sh
And enter browers http://192.168.0.203/IPU-GUI/website2/reboot.php.
But it still not work. :(
Member 10390715 2-Mar-17 3:37am View    
But when I run echo "$USER" > /tmp/www_script_user.txt in command line windows ====> resutl is root.
How can I switch user, and run PHP with apache user?
Member 10390715 2-Mar-17 3:30am View    
I don't know but here :(
[root@IPU ~]# ps -aux|grep apache
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
apache 2625 0.0 0.6 66364 6444 ? S 22:28 0:00 /usr/sbin/httpd
apache 2626 0.0 0.6 66364 6444 ? S 22:28 0:00 /usr/sbin/httpd
apache 2627 0.0 0.6 66364 6444 ? S 22:28 0:00 /usr/sbin/httpd
apache 2628 0.0 0.6 66364 6444 ? S 22:28 0:00 /usr/sbin/httpd
apache 2629 0.0 0.6 66364 6444 ? S 22:28 0:00 /usr/sbin/httpd
apache 2630 0.0 0.4 66364 4956 ? S 22:28 0:00 /usr/sbin/httpd
apache 2631 0.0 0.6 66364 6444 ? S 22:28 0:00 /usr/sbin/httpd
apache 2632 0.0 0.4 66364 4956 ? S 22:28 0:00 /usr/sbin/httpd
root 3268 0.0 0.0 4028 700 pts/0 S+ 22:32 0:00 grep apache
Member 10390715 2-Mar-17 3:29am View    
Deleted
file:///C:/Users/Napoleon/Desktop/Capture.JPG