deepin20 如何开机以root运行.sh脚本
Tofloor
poster avatar
langkye
deepin
2020-11-26 02:18
Author

我有一个脚本,开机后运行,需要root权限,怎么操作?

如: sudo ~/.sbin/startup.sh

echo "admin"

Reply Favorite View the author
All Replies
SamLukeYes
deepin
2020-11-26 02:32
#1
It has been deleted!
SamLukeYes
deepin
2020-11-26 02:34
#2

写一个 systemd unit

Reply View the author
ericneon
deepin
2020-11-26 06:48
#3

这样做很不安全啊!

Reply View the author
忘记、过去
Moderator
2020-11-26 10:17
#4

echo "你的密码" | sudo -S xxxxxxxxxx

就不用手动输入密码了。

Reply View the author