Patrick Schoenmakers <[email protected]> writes:

Hi Patrick,

> I want to sudo access a remote host which has BoKS security
> implemented instead of standard sudo. While on a commandline this
> basically works the same as sudo, I cannot use the multi-hop sudo
> trick for dired. This means I cannot browse files or edit under the
> sudo-ed account anymore which severely hampers the usability in this
> case as I'm back to remote vi which is a pain in emacs. So I'd have to
> go back to putty.
>
> Is there a way to configure multi-hop to use the BoKS method "sx su -
> <user>" instead of sudo?

You could define your own method, derived from the "su" declaration:

(add-to-list 'tramp-methods
  '("sx"
    (tramp-login-program        "sx")
    (tramp-login-args           (("su") ("-") ("%u")))
    (tramp-remote-shell         "/bin/sh")
    (tramp-remote-shell-login   ("-l"))
    (tramp-remote-shell-args    ("-c"))
    (tramp-connection-timeout   10)))

Access the remote host then as "/ssh:user1@remote|sx:user2@remote:"

This is completely untested, ping me if it doesn't work.

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to