Enabling ‘/var/log/messages’ in Natty

Why would you need it? Well, if at all you need it, here it is.

It is disabled in Natty by default. Follow me to get back whats rightfully yours..

This is the file you’re looking for:

What we will do is copy it elsewhere, rename that as “50-default_backup.conf” as a back up. We will edit a bit in it, and save it as “50-default.conf”. We will then move it to “/etc/rsyslog.d/”. All by just using the Terminal(and gedit because havent yet mastered vi yet)!!! Yes there are easier ways to do it.. But this is better!

Step 1: Ctrl+Alt+T or you can do it the boring way.. Applications> Accessories> Terminal.

Step 2: Type in the following in to the terminal ill explain soon.

$ cp /etc/rsyslog.d/50-default.conf ~/Desktop/
$ cd ~/Desktop
$ mv 50-default.conf 50-default_backup.conf
$ gedit 50-default_backup.conf

The first line there copies /etc/rsyslog.d/50-default.conf to your Desktop. Whats the “~” doing there? it fills in for “/home/your_user_name”.
The next line there is changing your working directory to “/home/your_user_name/Desktop/”.
Next one renames the file. Yes “mv” is move command. but moving a file to a directory already in which it is, if the file names are different,”mv” renames it.
Next line opens up Gedit for you to edit the new renamed file.

What you are looking for is:

#    auth,authpriv.none;\
#    cron,daemon.none;\
#    mail,news.none        -/var/log/messages

Step 3: Remove all the # at the starting in this section of the .conf file and save it as “50-default.conf” in your Desktop. this can be easily done through the GUI.

Step 4: Close gedit and get back to terminal.

Now we need to put our new file into “/etc/rsyslog.d/” directory. Heres how we do that:

Step 5: Type in the following now.

$ sudo mv -f ~/Desktop/50-default.conf  /etc/rsyslog.d/50-default.conf

Key in the password when asked for.
“sudo” lets you move that file into a restricted directory.
“mv -f” is used so that it over writes the existing file.

Step 6: In terminal:

$ sudo restart rsyslog

Viola! We are done.!!

About Manu Mohan

Just another 20yr old...With a screwed up college life and feels hes doesn't fit in..:)

Posted on September 21, 2011, in Linux Adventures, Ubuntu and tagged , , , . Bookmark the permalink. 2 Comments.

  1. Just wish to say your article is as amazing. The clearness in your post is simply excellent and i could assume you are an expert on this subject. Well with your permission let me to grab your feed to keep up to date with forthcoming post. Thanks a million and please keep up the rewarding work.

  2. wow! great information. Thanks for sharing.

Cracking your skull open while you hit it on the desk? Let me know about it...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: