Report this

What is the reason for this report?

Nothing working for non-root user

Posted on April 10, 2016
nsdm

By nsdm

On a fresh droplet, I created a new user. I gave them sudo access as described here (I am running Ubuntu 15.10 but I assume it’s all the same). My /etc/sudoers now contains

username ALL=(ALL:ALL) ALL

I then set up SSH access for the new user as described in this article.

When I first logged in as this new user, I could not do anything at all. Attempting to create a new directory in my user’s own home folder gave me Permission denied errors. When I logged in two days later, this was no longer a problem, but I remain at a loss about what happened there. I documented this here.

Now as I carry on attempting to configure my application, this user seems to have major problems. I have added the following to the user’s .bash_profile:

export PATH="$HOME/.rbenv/bin:$PATH"

Logging out and logging back in, this directive is not taking effect:

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

When I try to source it from the command line, I get:

$ source ~/.bash_profile
-sh: 2: source: not found

And just for kicks:

$ sudo source ~/.bash_profile
sudo: source: command not found

I am at a complete loss. This behavior is unlike anything I am seeing described in any documentation. All tutorials and instructions I read take for granted that these commands will operate normally without any further steps.

Please help me understand what is happening here.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.