#!/bin/bash
sudo -u username /home/sco/start_server.sh
或者
#!/bin/bash
su - username -c /etc/init.d/xxx.sh
#!/bin/bash
sudo -u username /home/sco/start_server.sh
或者
#!/bin/bash
su - username -c /etc/init.d/xxx.sh
转载于:https://www.cnblogs.com/sea-stream/p/10216668.html