script to su with password in script without root
Posted
by
Triplell89
on Super User
See other posts from Super User
or by Triplell89
Published on 2014-05-29T19:02:36Z
Indexed on
2014/05/29
21:38 UTC
Read the original article
Hit count: 256
I have scripted a process that involves updating symbolic links on files located on 3 different machines. On those machines exists 4 users each, who each need to have these links updated.
Using su, is there a way to pass the password argument to the command on a single line, without invoking sudo as the users will not have admin rights?
My only alternative solution at this point is to ssh around, however I would like to be able to do this without hardcoding in a bunch of hosts/ips.
© Super User or respective owner