I am trying this exact same thing with no luck so far. I will keep watching. I posted this same question awhile ago and people said use sudo but without the code. I do not think it works unless you are or can be root which does not work for me.
I am looking for a way to actually login to the newuserid within the script. I am stuck at the point you are with
su userid
vi newfile
but I want to be in the file logged on as the newuserid. So the question is, can I get the password entered somehow through the script. If not in the...
I am writing a script where a regular user submits the script and within the script the user logs in as a different user who owns a file so that the user can edit the file set up with permissions 755 and when the user exits the file he leaves the script and logs off the userid that owns the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.