How do I forward X when switching users?  I can ssh -X username@server.example.com and open GUIs just fine. However, then when I sudo su to root, the X11 forwarding seems to stop because the windows never seem to launch.  ssh access is disabled for root, otherwise I would just connect directly.
8823
Following are other questions which I think I need to know:   From a non X Session? (meaning root isn't logged into X) If multiple people were logged in on X, could I auto-detect who was on which screen, and thus programmatically detect which screen I need to launch the app on? Can I launch the app as the user? ( ok I'm 99.999% sure this is a yes ) Can I detect if users of group X are logged in to X?
7493
I don't care if I mess up the system (which is likely if I do things like this), or the potential security issues that this could imply. Note, that I don't just want to "", but run my GUI from bottom-up as root. I don't want to type my password for anything but just for login and have total control over it.  Of course, I want any application running as root, like Firefox, LibreOffice, etc. without having to mess up with the terminal. So, how do I do this?     This question tries to address users that do not like the current permission system with root being separated from normal users. I do not endorse such behaviors, but if a user wants to, for whatever reason, this question should fit their corncerns.   Not advisable for new users
108545
I know about "not using sudo su -" etc. But let's be honest, almost all of us do it.   So, here is the issue. We can't have root logins enabled, so we have to ssh in as our user then su to root.  Here is the process tree:       1  7897  7826  7826 ?           -1 S     1000   0:00 sshd: josh@pts/0  7897  7898  7898  7898 pts/0     8182 Ss    1000   0:00  \_ -bash  7898  7990  7990  7898 pts/0     8182 S        0   0:00      \_ sudo su -  7990  7991  7990  7898 pts/0     8182 S        0   0:00          \_ su -  7991  7992  7992  7898 pts/0     8182 S        0   0:00              \_  -su  7992  8182  8182  7898 pts/0     8182 R+       0   0:00                  \_ ps axjf   I would like to exit from root, then from my user with one command. Is there a way to do this?  BTW exit &amp;&amp; exit does not work because it exits the shell and doesnt process the rest of the command  josh@ubuntu:~$ sudo su - root@ubuntu:~# exit &amp;&amp; exit logout josh@ubuntu:~$
33652
I made a mistake in the username at the time of installation. So I changed the name of the user after logging in by creating a guest account with SUDO rights. But when I checked the list of users using ls /home command I am not seeing the new name for the user instead Old name is appearing. But I use the new name to login.   Is it like I need to change the name inside Home directory separately? Also , if there is any other changes needs to be done .. ?
102741
I have a server S that I need to connect to.  I'm connecting to S as user asdf with control master and after that I perform some stuff:  ssh -N -f -M -o ControlPath=$SSHSOCKET ${USER}@${IP} -p ${PORT} -i id_rsa ssh -to ControlPath=$SSHSOCKET ${USER}@${IP} -p ${PORT} "su -c whoami &amp;&amp; hostname &amp;&amp; exit"   It works as expected, but second line asks me  for password.  I am trying such fix:  echo 'qwerty' | ssh -t -to ControlPath=$SSHSOCKET ${K3_USER}@${IP} -p ${PORT} "su -c whoami &amp;&amp; hostname &amp;&amp; exit"   but it gets even worse:  muxserver_accept_control: tcgetattr: Inappropriate ioctl for device tcgetattr: Inappropriate ioctl for device Password:   For me, it's mandatory to ssh as asdf first. I also can't make any other ssh control master connections. I also can't modify any config on the target machine.  I just need to switch to root via ssh somehow. Any ideas ?
49219
Possible Duplicate:          Can I confine my users to their /home/%u directory using simply open-ssh configuration? I did the following from what I found on the Internet Stopped the server To the sshd_config file appended the following  Match group sftpusers     ChrootDirectory /home/%u     X11Forwarding no     AllowTcpForwarding no   started the server  FYI I have the users added to sftpusers group  My users can still access entire file structure on my system  Ubuntu Server 12.04 LTS with open-ssh installed
49465
I had enabled root login before and tried to change its password using this . But after successfully changing the password and locking it via sudo passwd -dl root. I cannot login back to SSH, it says Access is denied.  I have two users on my machine. root and admin, admin does not have su permission. When I try to use sudo on admin user, it says that admin is not in the sudoers file. That is why i need my su user back.
117812
I have set up an EC2 instance with ArchLinux for a client, and I am currently in the testing phase.   I am using PuTTY from Windows 8 to SSH into the machine. I have set up the connection profile correctly, and specified the correct key file.   When trying to login, I am presented with the option to choose which user I want to login as. I choose "root" and the connection proceeds with no problem, though I am not asked for the root password.  I want to forbid root logins, but when trying to login as any other user I get from the system:  Server refused our key   Also I get a popup window saying:  Disconnected: No supported authentication methods available (server sent: publickey)   Why is it that I cannot login as any other user? It is very important for me to forbid root logins.   On a side note, is it normal that I am not prompted for the root password?
39768
I know I can become root (super user) via the su command but I have to authorize it after entering the commands. Is there a way I can become root and authorize (with password) in one line
89504
I have created alias for username and it works fine   alias yb="ssh name@hostname"   It works fine, but I also want to create alias for password, Can anyone help how can I do this?
26522
There are a few SSH destinations I will frequently be connecting to and I'm wondering if rather than remember the IP address I can create a host alias for them.  I'd like to be able to use...  ssh -p xx user@domain.ssh  I've tried establishing this host in /etc/hosts and unless there's a service I needed to restart it had no effect.
58375
So when i try to use the Xorg command as a normal user, this is the error that it gives me :   /usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server   but i don't understand, what are the "console users"?  and when i switch to root it gives me another error :   _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running (EE)  Fatal server error: (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)  (EE)  Please consult the The X.Org Foundation support       at http://wiki.x.org  for help.  (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. (EE)  (EE) Server terminated with error (1). Closing log file.   So what is going on and what are the reason for each of these errors?   UPDATE: and the output of the command netstat -ln | grep -E '[.]X|:6[0-9][0-9][0-9] is :  unix  2      [ ACC ]     STREAM     LISTENING     18044    @/tmp/.X11-unix/X0 unix  2      [ ACC ]     STREAM     LISTENING     47610    @/tmp/.X11-unix/X1 unix  2      [ ACC ]     STREAM     LISTENING     18045    /tmp/.X11-unix/X0 unix  2      [ ACC ]     STREAM     LISTENING     47611    /tmp/.X11-unix/X1
57535
I'm trying to figure out what is "lightweight" way to configure my Ubuntu 16.04 LTS server to have access via GUI (over SSH as option). I would like to reach it from my Ubuntu 16.04 workstation. I have really poor knowledge about how those techniques work. I read about X11 and it seems it's possible to just install Xorg server and enable X11 forwarding and it's it.  But in other articles I read that it's just enough to install desktop common packages and it's not necessary to install all the GUI related stuff. So I'm really confused. I also see there are several methods like VNC, "plain" X11 forwarding, xRDP. They can be combined. I read different resources and as I realized the most preferable way to do this is to use xRDP? May be I'm wrong?  This article (one of I've read)  describes the xRDP installation and doesn't consider SSH. Here is the ssh forwarding How to forward X over SSH from Ubuntu machine?  The questions are:   Is the xRDP most preferable way achieve the goal? What steps should I do to have xRDP provide the remote GUI to me (What packages should I install to server and desktop)? I would like to have mate desktop. Should I install it to workstation or server or both?* How to enable xRDP over SSH tunnel?*   * - If the xRDP is not an option the last two questions relate to that one (VNC or something else) you suggest, please.
119526
We are having a little problem on a server. We want that some users should be able to do e.g. sudo and become root, but with the restriction that the user can't change root password. That is, a guarantee that we still can login to that server and become root no matter of what the other users will do.  Is that possible?
77228
when I try using a command with sudo everything works fine, however, if I want to log in as the superuser using su it doesn't let me. Why?
91457
I run a web app in one of my lab servers, and I have already setup X11 Forwarding on those machines. Other lab members can tunnel through SSH, and browse that web app on their local browser at home.  I can't. Last time I checked with them, there is almost nothing I need to do.  When I type 192.168.1.113/webapp I get nothing.   Any tips?  THanks.    I ended up using the second method :)  ssh -L 8080:&lt;server-ip-address&gt;:80 &lt;username&gt;@&lt;remote-addr&gt; -N
72372
I just installed Ubuntu. How do I set it up to allow me to ssh into it?  Right now I get "ssh: connect to host x.x.x.x port 22: Operation timed out".