New answers tagged

1

The man page describes it fairly well with the following: ``` -, -l, --login Start the shell as a login shell with an environment similar to a real login: o clears all the environment variables except TERM o initializes the environment variables HOME, SHELL, USER, LOGNAME, and ...


1

In general please AVOID using sshpass with a password. Everything you wrote can be observed by other users with the ps command and this SHOULD be of concern to you. Second problem there is here, I don't see you specifying -t option. This means you have disabled Defaults requiretty In your /etc/sudoers, which can have security implications. If you ...


0

Connecting to an X11 display requires two pieces of information: the display name (normally passed in the DISPLAY environment variable) and the cookie, which is a password for the display that every application must show when connecting. Typically the cookie is stored in ~/.Xauthority, but it can be stored in a different file indicated by the XAUTHORITY ...


0

My needs were slightly different so I came up with a slightly different solution. I needed the ability to run an X11 app as another user (who is not root). Running CentOS, so I don't have the sweet gksudo tool the lucky dogs with ubuntu have which does the Xauth magic. I really didn't want to break out some custom scripts just to login, switch user and run ...


0

I've been using the form username ALL=(ALL) NOPASSWD: /bin/su targetuser



Top 50 recent answers are included