New answers tagged

0

I needed something similar for ssh, scp etc. for a server which keeps changing IP every couple weeks (and our IT has a couple weeks delay in setting the host). I solved it using a special variable for this server: export FOO='131.227.aaa.bbb and then I can do just ssh bar@$FOO and I change the IP in my ~/.bashrc any time it changes...


0

Try something like that $ export LOGIN_USER="Math" $ su - $LOGIN_USER $ sudo xhost local:$LOGIN_USER &>/dev/null source Ps: the accepted answer not worked for me


-1

On Ubuntu you can use just sudo -u deploy $DAEMON $DAEMON_OPTS


0

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



Top 50 recent answers are included