HOWTO set up a new user on your Brightbox

Adding a new user with sudo privileges is pretty simple.

Add the user with the adduser script. It will ask you a few things about the new user, and prompt for a new password.

sudo adduser john

Giving sudo access

Then to give sudo rights to it, edit the sudo config file as the rails user:

sudo sudoedit /etc/sudoers

Duplicate the last line, but changing “rails” to whatever your new username is:

rails ALL=(ALL) ALL
john ALL=(ALL) ALL

WARNING: If you make an error in this file you could lock yourself, and us, out of root access. The only solution then is for us to boot into rescue mode and fix the file manually for you and this work would be chargeable. The sudoedit command should make sure you don't make any obvious mistakes, but double check your work!

Granting SSH access

Now you need to configure SSH to allow access for the new user. Edit the ssh config at /etc/ssh/sshd_config and add a new allow users line at the bottom. You'll see the other user access lines in there:

AllowUsers rails@*
AllowUsers john@*

Then reload ssh:

sudo /etc/init.d/ssh reload

Brightbox GEM warning

Our Brightbox GEM Capistrano recipes do assume that you're using the rails user in the usual home directory though. Changing the user and home directory will cause problems for it, but if you're using your own recipes, you can obviously customize them however you wish.

docs/howtosetupanewuser.txt · Last modified: 2010/02/04 11:51 by ben

UK Cloud Server Hosting & Cloud Hosting Providers - Brightbox Cloud

Simple and flexible UK cloud hosting for teams that insist on 100% uptime. Everything you need to deliver fast and highly available apps that delight your customers.

Get started now risk-free with £20 free credit.

Trusted by developers, big brands and people like you

512MB @brightbox cloud instance snapshotted, loaded onto new 2gb instance and cloud ip remapped. All without anyone noticing. ;)

Latest blog posts

Building a scaleable filesystem with S3QL and Orbit

All our Cloud Servers come with resilient local permanent disks, stored on SSDs in a RAID configuration. For periodic backups, you can use our server snapsho...

Read blog post

NixOS on Brightbox Cloud

NixOS is a Linux distribution that is configured using a functional language in a declarative way. I’ve been using it here at Brightbox as my main developme...

Read blog post

Scheduled snapshots for Cloud SQL

We’ve just added a new scheduled snapshots feature to Cloud SQL, our hassle-free MySQL cloud database service. Cloud SQL has always supported manually takin...

Read blog post

More blog posts...

Get started with Brightbox Sign up takes just two minutes...