Wednesday, October 30, 2013

Initial Server Setup with Ubuntu 12.04

When you first get a fresh server such as a Virtual Server you need to make some configuration on your server. This document guides you some basic configuration steps that will help you to setup a new box.

info any command that you run with sudo will be logged in /var/log/secure directory

step one : root login

when you get a new VS you will get also a username with root privileges. You can login to your box as root by using ssh. but this is not recommended. you can use alternative users to login to your box and use root priviledges after you login. If you install cygwin you can use following commend othwerise you can use putty to connect to your box by using given username and pass.

ssh root@yourserverip

step two : change your password

change your password by the following command 

passwd

go to the next step. you donot need to logout.

step three : create a new user

add a new user by using the following command. it can have any arbitrary name 

adduser mynewusername

after you set the password you donot need to enter any further information about the new user. you can live all the lines black if you wish.

step four  : root privileges

until now only root user has the root privileges. edit sudo configuration by using the following command 

visudo

find selection called user privilege sepecification. it will look like this : 

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

add following line 

mynewusername ALL=(ALL:ALL) ALL

save and exit the file.

done!


If you want you can make root login more restrictive by reading this article 


No comments:

LinkWithin

Related Posts Plugin for WordPress, Blogger...