How to Remove Kerberos Password in Linux

This is a very rare situation one might face. Suddenly your linux based computer, VPS or server might prompt you to enter Kerberos Password. Same thing happened to me, I don’t remember if I had set kerberos password in the past. I had only updated certain packages. This happened when I tried assign new password to an existing vsftpd user. In this case all I could think of is getting rid of Kerberos password to proceed with my work.

Kerberos password is network authentication protocol which allow nodes communicating over a non-secure network to prove their identity to one another securely. Now to get rid of Kerberos password, all we need to do is removing a package that causes the issue. However this is a security feature that one might use if they are conscious about their data.

To remove Kerberos Password in Linux:

sudo apt-get remove –purge libpam-krb5

This will now remove the kerberos password.

Category: Linux | Comments Off on How to Remove Kerberos Password in Linux

How to Compile and Install a Tar file in Linux

The .tar file format is derived from the phrase “tape archive”. Developers often use this format to compress and distribute their sources. By doing this, they need not worry about the platform, so anyone on any platform can directly compile and install on their computers. This short guide will teach you how to extract an tar file, compile and then install it on any linux distro.

After you download a .tar file, open Terminal and navigate to the directory where the file exists using ‘cd’ command. Then perform following commands:

xvzf packagename.tar.gz
cd packagename
./configure
make
make install

That’s it. The program should be installed now.

Category: Linux | Comments Off on How to Compile and Install a Tar file in Linux

How to Install MATE desktop environment in Ubuntu 12.04

MATE is a fork for GNOME which makes it a purely traditional much loved environment that we had in GNOME 2. This simple guide lets you install MATE on Ubuntu 12.04 with ease by following the simple procedures below:

Add the repository to the source list:

sudo add-apt-repository “deb http://packages.mate-desktop.org/repo/ubuntu oneiric main”

Then:

sudo apt-get update
sudo apt-get install mate-archive-keyring
sudo apt-get update
sudo apt-get install mate-core
sudo apt-get install mate-desktop-environment

That’s it. You should now be able to select MATE from the login screen.

Category: Linux | Comments Off on How to Install MATE desktop environment in Ubuntu 12.04

File Permissions in Ubuntu

Ability to set file permissions for individual users or user-groups is one of the most sought after features of Linux. If you are system admin for a school, college or a company you work for then proper file permission setting is among the most vital tasks.

The command used to modify file permissions is chmod, short for change mode of a file. You can also use Nautilus file browser to change the file permissions. I will cover the details after a little background on the file permissions. To find the permission settings for a file, issue the following command int he terminal from the directory where your file is.

ls -l
cmd output

As you can see, the first column in the output has some strange looking character sets. This set is the file permissions for that file (directory). The third column is the owner of the file (directory) and the fourth column is the default group of the file (directory). We can ignore all the other columns at this point.

In the first column, each set would be 10 character wide. The very first character is a d for a directory or just a (hyphen) for files. After that, the next three characters are the permissions for the owners account. The order is read-write-execute. If the superuser can read the file it would display r otherwise just a . Similarly for write and execute w and x would be displayed. The next three characters are permissions for all the other users belonging to the file group (from the fourth column in the output above). Final three characters are the permissions for everyone not part of the group. Superusers (root accounts) can always override all the settings mentioned here and none of the permissions apply to them.

Changing Permissions – The Easy Way

The easiest way, as I said, is to just change the file permissions using Nautilus but it’s time consuming if you want to change the permissions of a lot of files. Command line way may seem tedious to begin with but it’s the faster way once you know your way around. To change the permissions in Nautilus, right click on any file (directory). Go to properties and then to permissions. Change the permissions and click ok. That’s it.

File Permissions

Changing Permissions – The Faster Way

To change file permissions via the terminal, you can use the chmod command. To change permissions of a file, enter the following command in the terminal.

chmod ABC path/to/file

Here, ABC is a 3 digit number which is the decimal representation of the file permissions. For example, r-x means 101 in binary which translates to 5 in decimal. So, if you want everyone to have just read and execute access to files and only the owner has the write access to files then the permissions are rwx,r-x,r-x which is 111,101,101. That translates to 7,5,5 (comma is only given for clarity here). So, the command would now be,

chmod 755 path/to/file

Don’t worry if you don’t know how binary works, you will get used to it. Easiest way is add 4 for read, 2 for write and 1 for execute. So, considering the examples above, rwx = 4 + 2 + 1 = 7 and r-x = 4 + 0 + 1 = 5. You’ll get used to this. There is another way to to this, the text method (which I don’t prefer).

chmod who=permissions filename

Where Who is any from a range of letters, and each signifies who you are going to give the permission to. They are as follows:

u – The user that own the file.
g – The group the file belongs to.
o – The other users i.e. everyone else.
a – all of the above – use this instead of having to type ugo.

And then you can directly write rwx in front of the equal sign. For example,

chmod g=rx

Next post will cover setting default permissions to files you create using umasks.

Category: Linux | Comments Off on File Permissions in Ubuntu

How to change the Hostname in Ubuntu

There are times you may come up with a need for change in your computer’s identity over network. This is when you will have to change the Hostname of your computer. The hostname is pretty much like a label to your computer or the device for identification over the network. The hostname can be just a simple name, an IP Address or even a domain name.

To change the hostname in Ubuntu, follow these simple steps:

1. Find out your existing hostname by entering this command in terminal:

hostname

hostname ubuntu

So on my computer, the hostname is “santhosh-desktop”

2. Change the hostname by editing:

sudo nano /etc/hostname

You will see the existing hostname. Change it to whatever new hostname you want and save it by hitting Ctrl + O

In this tutorial, I change it to

gigacore-desktop

3. Now edit the hosts:

sudo nano /etc/hosts

Here change the ::1 and 127.0.1.1 to the new hostname you chose.

::1 gigacore-desktop localhost6.localdomain6 localhost6
127.0.1.1 gigacore-desktop

3. Restart the hostname service.

sudo /etc/init.d/hostname restart

Now check the hostname by following the step 1 and you should see the new hostname.

Category: Linux | Comments Off on How to change the Hostname in Ubuntu

Setting Up WiFi Connection Using WiCD

WiCD Logo

Often times Linux users find themselves wanting more from the network manager, especially laptop users on the move find it difficult to manage all the different networks they have access to. WiCD is one of the best tools for people wanting more. It’s gtk based network configuration tool, especially meant for wireless networks written in python. Apart from being dependent on gtk, it does not require any of gnome components to work. Rejoice all the openbox and fluxbox users.

Here’s what WiCD can do (taken from the official documentation),

Compatible with standard *nix networking commands (iwconfig, ifconfig, etc)
Once configured, will connect even if the X display does not start
Can be managed and configured via the command line using wicd-curses
Support for wired networks, as well as named profiles to save multiple wired configurations.
Supports configuring static IP addresses and DHCP on a per network basis
Store different static IPs, gateways, subnet masks, DNS server addresses per network
Automatically connect at boot – no user intervention required, even for encrypted networks
Keeps network keys in root accesible only (600) files (unencrypted, however)
Encryption (template based)

WPA 1/2
WEP
LEAP
TTLS
EAP
PEAP

Automatically connects at resume from suspend
Displays information about the network
Ability to run scripts before/after connecting/disconnecting

All this and it’s really easy to use. Let’s start by installing WiCD, if you are an Ubuntu user, you can install WiCD very easily. All you need to do is open a terminal and issue following command,

sudo apt-get install wicd

This will install both WiCD with all the required dependencies. It will then ask you for the users you want to configure WiCD for. WiCD also comes with a tray icon. You can add it by right clicking a panel and choosing add to panel option then choose custom application launcher. Give it any name you want and in the command box type,

/usr/bin/wicd-gtk

and you will have a tray icon now. Open WiCD and you will be greeted with a screen showing all the wireless networks in the range. You can then chose to connect to any network you want. If the network is protected by any security then you would have to chose the method of security in place and enter the correct key to connect to the network.

WiCD Networks

WiCD Networks

You, of course, also get the option to chose whether to use DHCP or static IPs, which DNS you want to use, which secondary DNS you want to use. gateways, subnet masks. You can also use it to manage wired networks.

WiCD Advanced

WiCD Advanced

And there’s more…

WiCD Advanced 2.0

WiCD Advanced 2.0

I for one have never had any problems with WiCD., although there are people who report certain incidents, it’s free from most major bugs and is a very solid program. One of my favourite distributions, Zenwalk, comes with WiCD pre-installed. Rest assured, this is a great tool to manage all your moving connection needs.

Category: Linux | Comments Off on Setting Up WiFi Connection Using WiCD

How to generate strong passwords in linux

passwordHow many times have you bothered about creating a strong password to your account? Be it an email account, server login, ssh or anything and everything that requires authentication. Usually, people create passwords that are easier to remember. But there are cases like database account, ssh accounts and other sensitive type of accounts where you need to create a password that is strong enough to resist any kind of password decryption methods used by hackers. Generating a password so strong can make you go bonkers. So you need something that generates a strong password automatically that is easier to remember as well.

Say hello APG.

It stands for Automated Password Generator. And as name suggests it is tool used to generate random passwords. APG houses two password generation algorithms. One is the Pronounceable Password Generation Algorithm (default) and the other is the Random Character Password Generation Algorithm. While the first generates strong passwords that are easy enough to remember since it provides you some clues on how to remember it, the latter just generates random passwords.

Installing APG

APG is literally available for any *NIX based operating system. In this tutorial, I will tell you how to install it on Ubuntu / Debian and Fedora / CentOS linux operating systems.

In Ubuntu:

In your terminal –

sudo apt-get install apg

In Fedora:

yum install apg

Using APG

Using APG is really simple. Let’s begin with simple password generation that is easy to remember and pronounceable, which is default. It will generated 6 passwords by using the random keyboard data you provide.

In your terminal,

apg

APG will then prompt you to input some random data so that it can generate a password for you (eg. I like noob2geek.com). Do remember that these passwords will be generated randomly no matter who many times you provide the same keyboard input. So passwords won’t be the same every time. And as you can see the bracket, it provides a pronounceable clue to remember them.

OkBazCag4 (Ok-Baz-Cag-FOUR)
TabOgUt6 (Tab-Og-Ut-SIX)
novtarsEst7 (nov-tars-Est-SEVEN)
bowebcojCal5 (bow-eb-coj-Cal-FIVE)
AbrIbgan2 (Abr-Ib-gan-TWO)
eikkotVis0 (eik-kot-Vis-ZERO)

Now to generate random passwords that are not pronounceable, you need to use the -a 1 option. Where -a is the Algorithm and 1 selects random mode.

apg -a 1

This do not require any random keyboard inputs.

%l?b`m^,
OS6}C>kwZn
RI9]VZ.Hk
/1}mYh5)
[>b/s~1:Y
‘*aST9″bZ

And finally to create a password that is really strong, really long (upto 63 characters) and really hard to break it, you need to make use of more options.

apg -s -a 1 -m 63 -n 4

This actually prompts you to enter some random inputs, but just hit “ENTER” key again to output the password.

}_B^kA#!c[g*8utG8″3S|2aHfP(~I_n|r8KEn”Uxq,[wtoSDYNx{K,0q:cXD619
lkSPcTbsP:>_AfQQP-gM)pI”6LXp-8}E0S*B[@jCY(6.X0j]%^9H`NN8e,,X&TH
bG05%ZF4n*ayxl-Rj5~6tV~zqPk6>d+c]_WCS4&sr7Eeq7!n?M2LpXUqjl7/[P.
B^U&@EqJpke6y`h7J?,CK#’Q!%u-`NkwDg5.Wm3ny@rYlii,>%Y0′+’g>!lki8i

This is really hard to remember as well, if you can, you got to be supernatural. To view all APG options, type man apg in your terminal.

Category: Linux | Comments Off on How to generate strong passwords in linux