Enabling ‘/var/log/messages’ in Natty
Posted by Manu Mohan
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:
# 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 MohanJust 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 /var/log/messages missing, /var/log/messages no such file or directory exists, Ubuntu, Ubuntu 10.04 /var/log/messages. Bookmark the permalink. 2 Comments.