我想编写一个脚本,允许我将密码传递给su命令。其原因是为了自动化从非根帐户登录到根的过程。从我对安全的基本理解来看,我知道这是危险的。我仍然需要这样做,试图通过从文件中读取密码来破解根用户密码。请注意,sudo不是一个选项,因为我的用户不在sudoer列表中。
我尝试过的东西--在使用管道中传递密码--由于"su must be used from terminal"类型错误而无效--使用echo传递密码--在输入密码后,任何回
/include -O2 -Wall -c -o send.o send.csend.c:25: warning: format not astring literal and no format arguments
send.c:27: warning: ignoring return value of ‘fgets’, declaredwit