Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
sesu 命令提示我输入密码。我想将密码传递给 shell 脚本并登录我的 shell 脚本。在 shell 脚本中执行此操作是否有更好的方法?
-bash-3.2$ sesu someusername Please enter your password:
也许这会奏效
echo password | sesu someusername