Ubuntu 14.04 LTS some basic configurations

My new server has a Ubuntu 14.04 LTS.
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)

Change/Create Root Password

sudo passwd root

Create a New User

adduser demo

Add Root Privileges to new user

visudo

# User privilege specification
root ALL=(ALL:ALL) ALL
demo ALL=(ALL:ALL) ALL

Limit users to switch to root

Edit the configuration file

nano /etc/pam.d/su

Uncomment line 15
# auth required pam_wheel.so deny group=nosu

Add previlege to user that can su

usermod -G adm demo

Configure SSH

Edit  SSH deamon config file

nano /etc/ssh/sshd_config

Disable Root Login

PermitRootLogin no

Explicitly Permit Certain Users

WARNING! you can loose access if u typo the username

AllowUsers demo demo2

Reload SSH

service ssh restart

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.