what service to restart for /var/log/auth.log to start
Here is a situation since the log files on my server had grown to several Gigabytes I took a backup of directory /var/log and then manually when to each subdirectory of /var/log and the files which were big in size I did
cat > /var/log/file_which_is_big
press 2 times enter key (basically over wrote those files with a blank space) and then
Ctrl+C
So basically I over wrote those files to be blank.
Now when I open /var/log/auth.log I don't see any entry (which is expected also since I over wrote) but when I exit the SSH session and login again then also I do not see any entry in auth.log is there any way other than rebooting the machine to make sure I keep getting the entries in /var/log/auth.log I am not sure which service writes in this file.
This is a Ubuntu 10.04 server.
Solution 1:
-
restart rsyslog:
$sudo service rsyslog restart
-
Use echo, then not have to restart rsyslog
$sudo echo -n > /var/log/file_which_is_big
Solution 2:
On ubuntu 10.04
sudo service syslog-ng restart