|
From: | Emiliano Vazquez |
Subject: | Re: [Fab-user] Run as root without sudo and root ssh disabled |
Date: | Fri, 15 Jun 2018 13:13:48 -0300 |
If you encounter issues with v2 (it's still very early after release) v1 does have an 'env.prompts' setting. It's much simpler than v2's watcher functionality, but it might still get the job done so check it out.
On Fri, Jun 15, 2018 at 8:14 AM, Emiliano Vazquez <address@hidden> wrote:I think i'm running version 1 of fabric.I will install fabric v2 and start againOn Fri, Jun 15, 2018 at 12:09 PM Emiliano Vazquez <address@hidden> wrote:I install invoke from pip, then i get this error:TypeError: run() got an unexpected keyword argument 'watchers'I need to import something else?best regards i still reading ...On Fri, Jun 15, 2018 at 11:45 AM Emiliano Vazquez <address@hidden> wrote:thanks i will checkout right now!On Fri, Jun 15, 2018 at 11:39 AM Brandon Whaley <address@hidden> wrote:I think you may be able to use su by setting up a watcher for su's password prompt and using su -c "command" via run:responder = Responder(pattern=r"Password: ",response="thisismysecretpassword",)c.run("su -c 'something-that-needs-root'", watchers=[responder])On Fri, Jun 15, 2018 at 9:19 AM Emiliano Vazquez <address@hidden> wrote:Hi guys. I'm stuck on this._______________________________________________I have some debian boxes without sudo and only my user working.Today i do this:1. Login to box as "myuser"2. $su -3. Ask for the root password (diferent from myuser password)4. I got root => #I can't make it work with fabric.sudo('sh /tmp/myscript.sh') did not workI read about using expect but i don't know if this is the "python way" to do this.Any hint will be apreciattedEmiliano
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user
_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user
--
[Prev in Thread] | Current Thread | [Next in Thread] |