LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-07-2011, 03:29 PM   #1
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
wierd ssh server problem, what just happened?


at the computer shop we have an ubuntu 9.10 server that we log into via ssh or webmin

today i was trying to ssh into the machine and got connection refused, so i logged into webmin and found the ssh server not running

when i tried to start with webmin it i got the error

Code:
failed to start ssh server
* /dev/null not a character device
went over to the shell command part of webmin and issued ls /dev -l and looked at the output and found something of concern

Code:
-rw-rw-rw-  1 root   root           0 2011-02-07 14:23 null
-rw-rw-rw-  1 root   root          76 2011-02-06 07:38 null.1
-rw-rw-rw-  1 root   root           0 2011-01-30 07:41 null.2
crw-rw-rw-  1 root   root      1,   3 2011-01-23 08:55 null.3
the obvious answer for the short term was
Code:
#rm -f /dev/null
#mv /dev/null.3 /dev/null
but that is only a temporary fix if whatever caused that is running periodically
i need to get at the root of the problem and not just treat the symptom

what would do this and why and how can i prevent such a thing from happening again?

Last edited by frieza; 02-07-2011 at 03:30 PM.
 
Old 02-07-2011, 03:33 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
It looks like something is rotating /dev/null every week. Check your logrotate config files.

Proper /dev/null reconstruction, from "man null":

Code:
 mknod -m 666 /dev/null c 1 3
              chown root:root /dev/null
 
Old 02-07-2011, 04:24 PM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Original Poster
Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
upon further investigation /dev/null.1 contained the following line

Code:
ls: cannot access /var/cache/apt/archives//*.deb: No such file or directory
none of the logrotates conf files seem to have anything that would do that [see attachment]
Attached Files
File Type: txt logrotates.txt (5.6 KB, 14 views)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
a wierd something that happened yesterday frieza General 12 03-23-2010 05:02 AM
rsync + ssh almost got it! But having a wierd problem :( neyoung Linux - Software 6 02-22-2007 03:54 AM
Wierd dependency problem with openldap-server package Akhran Fedora 1 02-15-2006 08:38 AM
SSH login wierd... Why is that? DragonM15 Linux - General 5 12-19-2005 01:26 AM
ssh/DNS - what happened? synaptical Linux - Networking 4 11-23-2003 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration