Can't edit sudoers file; can't install Ruby 1.9.3 for all users



I’ve got a VPS and have been trying to get my non-admin user added to the sudoers file to no avail. I tried running:

which worked and said my account was added to that group but every time I try to run a sudo command with that account, I get this message:

And when I open up sudoers in vi, I see that I am, in fact, not added to the file. And sudoers is stuck in read-only. Using sudo visudo results in me getting this message:

So I can’t even edit the file in the way it’s supposed to be edited. I turned off Panel user management, rebooted the server and tried again to edit the sudoers file and it’s the same situation.

What’s INCREDIBLY frustrating about all this is that for my admin user (admin_kyle), I have RVM installed with Ruby 1.9.3-p374. When I’m in ps_kkerley and I check rvm list, I get “no rubies installed” and every attempt to install one ends in failure because I don’t have access to create directories because that’s not an admin user and despite being in the sudo group, ps_kkerley cannot run sudo commands.

When I go to use admin_kyle to run bundle install on my site, it gets up to this point:

So…again, Ruby 1.9.3-p374 is installed and being used by RVM for my admin_kyle account which I’m using to try and force the install of the gems needed for my site to work but I can’t get past a certain point because Ruby 1.9.2 or greater isn’t installed despite it being installed and I can’t progress.

I’m getting extremely frustrated and after hours of Googling for answers for this am no better off than I was beforehand. Can someone PLEASE offer some suggestions/tips for this?

I’m going to cancel my VPS and regular hosting plan pretty quickly here if I can’t get this resolved ASAP.


Did you try making the alternate user an “admin user” via Panel ?


There’s no option for that when I go to edit that account.


Panel > VPS > Manage Admin Users


Yes, I’m aware of that page, however, that only allows me to add new users. So when I go to add ps_kkerley, I get a message that the username is already in use.


Add a new user there and see if you can run the domain under that user via Manage Domains.


sXi: For security reasons, we don’t allow sites to be hosted under admin users.

Starting from the beginning, though:

[quote]I’ve got a VPS and have been trying to get my non-admin user added to the sudoers file to no avail. I tried running:

sudo adduser sudo

which worked and said my account was added to that group but every time I try to run a sudo command with that account, I get this message:

ps_kkerley is not in the sudoers file. This incident will be reported.

The way we have the sudoers file configured by default does not give sudo access to users in the “sudo” group. I don’t believe we have any documentation which indicates that this usage should work, either — if you need users with sudo access, create them as admin users, and use them for tasks separate from hosting web content.

I’m not super familiar with RVM, but I’m pretty sure that this is expected behavior. When running in the default, recommended “single-user installation” mode, RVM installs a version of Ruby that’s only accessible by the user it was installed under. Other users are not affected. So what you’d want to do here would be to use RVM to install Ruby 1.9 under the ps_kkerley user — you shouldn’t need an admin user to do this.


I’ve installed RVM for all users, however, Ruby installations are NOT accessible by all users for whatever reason. admin_kyle has access to 1.9.3-p374. ps_kkerley has access to 1.8.7 which was installed by default on the server as far as I can tell.

Running “rvm list” results in “no rubies found” and then instructions on how to install a version of Ruby through RVM. I’ve attempted numerous times to install any version of Ruby using ps_kkerley and the result is always the same: failure due to inability to write to various directories that need write permission in order to install Ruby.

Hence me attempting to grant ps_kkerley sudo access as I don’t know how else to get Ruby 1.9.3-p374 installed under that user.
I just attempted to install again using ps_kkerley through Prompt on my iPhone and this is what I get every time:

I’ve attempted to run sudo apt-get update using the admin_kyle account and that results in its own string of errors that is another story entirely. I’ve tried to follow the directions that RVM spits out at me but none of it works. I can’t do apt-get update with ps_kkerley; running rvm autolibs enable doesn’t change anything. I can’t seem to move forward with this at all.


Can’t the user be removed from the admin list after performing any necessary customisation, allowing it to once again serve public accessible content?


sXi: Once an admin user, forever an admin user. You can delete an admin user entirely, but you can’t switch it to any other type of user — the only option that shows up under “type” when you edit those users is “admin user”. (Which behaves like a shell user with FTP always disabled, except with sudo access.)


So is that that? I can’t edit the sudoers file and I can’t install Ruby 1.9.3 for the user that needs it because I don’t have permissions to do either?


All right, the lack of any help here forced my hand–I’ve moved on to Digital Ocean as they actually give access to the root account and I’ve been able to install RVM with the versions of Ruby I need. And it’s 5x less/mo than Dreamhost.

Thanks for a good 4 years, but it’s clearly time to move on.


I’m in the same boat as the other guy. Here is the issue over again maybe in bullet points someone will help.

  • rvm does not have Debian 6.x binaries for anything above 1.8.7, build tools are required, hence the sudo

  • To deploy sites requiring ruby 1.9.x or better (rails4 should have ruby 2.x) we need to use rvm.

  • I don’t think many people are OK with an VM wide rvm install, the only option that dreamhost is giving us with the ‘admin user’ approach. It removes the whole idea behind rvm in the first place. Deploy what you need where you need it.

  • Changing how unix group/sudo works because of “security” is sorta funny. I understand how this could go very wrong very quickly however it’s a VM, so what? Blow it away and start over.

Like the other guy, I’ll leave (client since early 00s, have many many clients/recommendations here) if something that should be simple is not fixed with haste.