Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security, /etc folder and passwd/shadow file permissions 2

Status
Not open for further replies.

bkonner

MIS
Apr 28, 2001
101
US
Howdy,

I have had a major hacking problem. While I am cleaning up this mess, what is the correct security for the /etc folder and for the passwd file. Do I have to give the world read permissions?

Thanks

bkonner
 
Hi

I'm afraid the /etc/passwd file must be world readable, if users should be able to log in. Use permissions 644.
On my system I have 755 rights on the /etc directory.

Correct me if I'm wrong.

-Katamann
 
pcunix is righ(and get's a star for that). The hacker could have left a backdoor somewhere, and my bad not pointing that out!

-Katamann
 
I am subscribing too to the above idea. Complete reinstall is the best solution.

Good luck! Cristian
 
Re-installing everything is a must, IMHO Tony deserves a second star for this absolute truth.
Use the original CDs rather than a full backup from last week because the hackers might have been present for a long time.
If possible, try to find how they entered because if you don't tap that hole, the history might repeat.
If you want to investigate, mount your filesystem in read-only mode (so you won't modify or overwrite any evidence) and eventually make a copy. After re-installing, you will be able to compare the original files with the copy and detect eventual modifications in the OS binaries and in other critical files.
If you don't have one, a system like TripWire would be very useful in the future.
 
Also, when re-installing I would advise getting the latest STABLE version of your linux flavor. There will proabably be more security fixes. Also update any programs that you run. FTP, SENDMAIL and BIND are prime targets and should be kept up to date!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top