RSSAll Entries in the "Debian" Category

Ubuntu Remote Desktop – multiple users

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:

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

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

Next what we need is a VNC server.

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:

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

Edit the xstartup configuration file:

And make it looks like this:

Now you can start the vnc server with this:

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:

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:

Open VNC startup file for the ‘newuser’

And paste the same configuration as for the first user:

Save the file and start the service

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:

Inside put the following massive:

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.

Then create startup script for VNC server as:

And put the following lines inside:

Make the script executable, and add it to the startup scripts:

Now:

And all added users in /etc/vncserver/vncservers.conf will be able to connect via Remote Desktop.

Certainly make sure VNC ports are anebled on the firewall.

Also take in mind that VNC is alsways better to be combined with SSH tunnel as its encryption and vulnerability issues are well known.

Tags

GPG error NO_PUBKEY

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

Simple resolution can be performed with the following two lines:

Take in mind to change the key with the one from your error.

Tags

How to disconnect (kick out) other SSH users

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.

First you will have to login to the Linux server via SSH – if you are not aware how just click on the link.

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

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

List logged users Linux

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:

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

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

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.

Tags

Debian software selection

This tutorial continues from Partitioning disk – Debian installation and will cover the final steps of Install Debian Linux using graphical install .

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.

The Debian software installation options are:

Desktop environment ‘“ with this package Debian will add all applications needed for fully functional Desktop environment.

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.

Standard system ‘“ most of the standard Linux packages that usually.

Tags

Partitioning disk Debian installation

This tutorial continues from Install Debian Linux using graphical install , and will proceed with disk partitioning for the Debain installation.

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.

The partition methods are:

– Guided ‘“ use entire disk
– Guided ‘“ use entire disk and set up LVM (Logical volume management)
– Guided ‘“ use entire disk and set up encrypted LVM
– Manual

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.

Install Debian Linux using graphical install

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.

First find a suitable Debian distribution at http://www.debian.org/ . If you have good network connection, you may decide to do Debian network install. Otherwise just choose one of the provided Debian CD ISO images and download it locally. Then burn it with your preferred CD/DVD burning program, and boot from that new media.

You will see the first Debian installation page:

Tags