All Entries in the "Debian" Category

When I got my new dedicated server setup with Ubuntu server 12.04 LTS, I wanted to use it both for website hosting and multiple users remote desktop work.
It took me some time to arrange all the steps to have the above completed, and as far as the hosting part was pretty easy, the multiple Ubuntu users desktop setup needed some jugs of coffee before start working as I wanted it.

So, I presume you have logged in to your server with some user already, so we will stat with updating the system:

Shell

1

sudo apt-getupdate

Next, as I want all Gnome desktop features, will install it completely with:

Shell

1

sudo apt-getinstall ubuntu-desktop

Unity looks fancy, but I want the old Gnome panel, and I do not need “compiz”, so:

Shell

1

2

3

sudo apt-getremove compix unity

sudo apt-getinstall gnome-panel

Next what we need is a VNC server.

Shell

1

sudo apt-getinstall vnc4server

The tricky part here is that you have to create several configuration files for the Ubuntu Remote Desktop user. This is really time consuming if you have to read all the settings and creating the files by yourself.

It is more easy to start the VNC server which will create the files automatically:

Shell

1

vnc4server:2

You will be asked for a password so enter it, and then kill the server as we have to make some configuration changes:

Shell

1

vnc4server-kill:2

Edit the xstartup configuration file:

Shell

1

vi.vnc/xstartup

And make it looks like this:

Shell

1

2

3

4

5

6

7

8

9

#!/bin/sh

[-x/etc/vnc/xstartup]&&exec/etc/vnc/xstartup

[-r$HOME/.Xresources]&&xrdb$HOME/.Xresources

xsetroot-solid grey

vncconfig-iconic&

x-window-manager&

gnome-panel&

gnome-session&

Now you can start the vnc server with this:

Shell

1

vnc4server:2-geometry1024x768-depth24

Certainly you can change the settings if you want different Remote Desktop geometry.

Now use your preferred VNC client – http://remmina.sourceforge.net/ (Linux) and http://www.tightvnc.com/download.php (Windows) are my suggestions – and connect to the Ubuntu Remote Desktop server using x.x.x.x:2 as (:2) is the number of display used to run for the client. If you have more than one running you should use different number at the end.

As I saying different desktops, I am going to add another user to my Ubuntu Remote Desktop server.
For this I will need to repeat the above steps for creating (and starting) the VNC profile for each user. This one is not yet automatically implemented, but it is not a big deal.
First I will add another user:

Shell

1

sudo adduser newuser

Complete the several steps for creating the user which is including creating the password and user personal information.
(A little trick when you want to add user with administrative privileges is to type the command as : adduser admin
)
Then start the VNC server once to create the VNC password:

Shell

1

2

sudo su newuser vnc4server:3

sudo su newuser vnc4server-kill:3

Open VNC startup file for the ‘newuser’

Shell

1

sudo vi/home/newuser/.vnc/xstartup

And paste the same configuration as for the first user:

C++

1

2

3

4

5

6

7

8

9

#!/bin/sh

[-x/etc/vnc/xstartup]&&exec/etc/vnc/xstartup

[-r$HOME/.Xresources]&&xrdb$HOME/.Xresources

xsetroot-solid grey

vncconfig-iconic&

x-window-manager&

gnome-panel&

gnome-session&

Save the file and start the service

Shell

1

sudo su newuser vnc4server:3-geometry1024x768-depth24

Now using VNC client you can connect to the new user Desktop as going to x.x.x.x:3 address.

The next step is to automate a little bit the start-up precess for these Ubuntu Remote Desktop users. Otherwise you have to start vnc4server for each user when the server is rebooted.

So, switch to root (it is just more easier) and then create vncserver folder and create file as vncservers.conf:

Shell

1

2

3

sudo su-

mkdir-p/etc/vncserver

vi/etc/vncserver/vncservers.conf

Inside put the following massive:

Shell

1

2

3

VNCSERVERS="2:user 3:newuser"

VNCSERVERARGS[2]="-geometry 1024x768 -depth 24"

VNCSERVERARGS[3]="-geometry 1024x768 -depth 24"

Where ‘user’ is the main user you are dealing with (the one we configured VNC for initially) and ‘newuser’ which is the second user are we have created. If you have more users created and the above steps for settings passwords and vnc4srver start-up completed, add more lines accordingly wit (:4),(:5) etc. screens.

This quick tutorial is to show you how to fix bad GPG key or missing(deleted )GPG key on a Debian-like system.
Usually the next error appears when you try to install application or update OS with apt-get update:

GPG error: http://linux.dell.com Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY AS4433E25E3D7775

Tags

In this tutorial I will talk about how to disconnect SSH user from Linux remote server.

This is useful when you have stuck SSH connections or there areÂ suspicious IPs connected to the server. If your case is the second one you may kick out the hacker from the server, but even disconnected he may have setup already backdoor or application that will return theÂ connection to him. Anyway the first step will be to kill sshd processes serving other connection but yours.

Once logged in list all current users on the server using ‘w’ command – simply type:

Shell

1

[root@yourserver/]#w

This will list all users on the Linux box like this:

As you can see there are several usersÂ currently logged in, and to discover which one is yours can be done comparing your IP address, what is currently doing as well as the time – for how long the users is on the server.If you are just logged in your time will be the current one on the server.

To list which user which TTY(pts) is using we have to use the Linux ‘ps’ command with extended output like this:

Shell

1

[root@yourserver/]psfaux|grepsshd

The output will show which “sshd” service running for which ‘pts‘ stands:

Now I want to kick off Linux user with pts / 4 marked on the image, and for that I will use Linux ‘kill’ command.

Shell

1

[root@yourserver/]kill-96702

This will send kill signal to process 6702 which is the number for the “sshd” service with pts / 4 running on the server.
After you have executed this command try the ‘w’ command to see if the user is still logged in.

We will continue with Debian Software selection as at the moment, only the core of the system is installed. To fit the system as per your needs, you can choose to install one or more of the following predefined collections of software.

Web server – program that, using the client/server model and the World Wide Web”s Hypertext Transfer Protocol ( HTTP ), serves the files that form Web pages to Web users. This will install Apache one of the leading Web server applications.

Print server ‘“ this will add print support

DNS server ‘“ if you want to have custom DNS like ns1.mydomain.com, then this service will be needful

File server ‘“ thjis will provide a location for the shared storage of computer files (such as documents, sound files, photographs, movies, images, databases, etc.) that can be accessed by the workstations that are attached to the computer network.
Mail server

SQL database ‘“ this is a computer program that provides database services to other computer programs or computers, as defined by the client-server model.

Laptop ‘“ includes packages for Laptop power-management and features support.

When you are ready click on ‘Continue’ to proceed with Debian partition disk section. The installer can guide you trough partitioning a disk (using different standard schemes) or, if you prefer, you can do it manually. Using guided partitioning you will still have a chance later to review and customize the results.

If you choose guided partitioning for an entire disk, you will be asked which disk should be used.

Just for your information: Logical volume management provides a higher-level view of the disk storage on a computer system than the traditional view of disks and partitions. This gives the system administrator much more flexibility in allocating storage to applications and users.

This will be a review of an installation of Debian Linux using graphical install. This will be useful in case you are changing Operating systems and just want to see what the install requires.

In general – Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run.
Debian GNU/Linux provides more than a pure OS: it comes with over 25000 packages, precompiled software bundled up in a nice format for easy installation on your machine.