ubuntu - User has Sudo access locally but not remotely

07
2014-07
  • Craig Smith

    I've got a Ubuntu desktop installed as a vm on Windows 2012 server. I've installed Likewise Active Directory to allow domain users to log into the machine with Windows credentials. In my sudoers file, I've added a Windows group membership to allow sudo access to certain users. Locally (connecting to the Ubuntu machine from Hyper-V Manager) the Ubuntu machine this works. My Windows user can log in and has sudo access.

    However, when I use Windows remote desktop connection my user is able to log in but doesn't have sudo access. I get an error:

    User username is not in the sudoers file, this will be reported

    Any ideas on how to fix this?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    Setup ubuntu for remote access?
  • JD Isaacks

    I have a ubuntu machine that is not ideal to work directly on the machine as there is no monitor,mouse, keyboard usually connected to it. So I have VNC on it so I can remote access it from my desk. I have it set to auto log into my user so I can reconnect after a restart. But it comes up saying:

    Enter password to unlock your login keyring

    And I cannot VNC into it until I manually go over, hook up a keyboard, etc., enter my password.

    Is there a way to set this up so I can remote access without having to go get on the machine and enter my password first?


  • Related Answers
  • dholbert

    Rather than VNC, I highly recommend using the free NoMachine remote desktop system. It's more secure -- the connection is established via SSH authentication, with your username & password on the linux machine. It also removes the requirement for the server to auto-log-in -- it can just boot up to the login screen, and your NoMachine session happens in the background.

    Download page is here -- you need to install the debs for "NX Free Edition For Linux" on the server (all three packages that it provides, in alphabetical order -- client, node, and then server package). And then you need to install "NX Client for Windows" on your windows machine.

  • dholbert

    Is the computer connected via a wireless network? (I'm guessing 'yes' -- that would expalin the need to unlock your keyring, since wireless passwords are among the things stored in your user's login keyring.)

    If so, one solution would be to connect the machine via wired ethernet, instead of wireless. Then, it'll be able to get on the network (and listen for VNC connections) without needing to unlock your login keyring.

  • Anders

    You should not put yourself into the risk of being hacked by sending your login/password in clear text over your network. Or using login services like this terminal login.

    Please use SSH instead.

    Just install the package ssh-server on your server and install a ssh-client software in your windows computer

    Then you can use ssh to log in securly into your server, without the risk of someone sniffing your login/password or someone do Man in the middle attack on you. You are supposed to be able to run different services, like remote desktop tunneling through ssh. That is the secure way of doing remote login.

    putty is supposed to be a good ssh client for MS Windows.

    http://www.chiark.greenend.org.uk/~sgtatham/putty/

  • Seasoned Advice (cooking)

    I am not sure if you have seen this before, but GNOME has a document describing how to use PAM to unlock keyrings upon login.

    You would just have to configure the machine once, and then your autologin should unlock the keyring by itself every time.