LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-17-2003, 06:12 PM   #1
Jiggy
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
Removing unnecessary services and users/groups


Would doing any of this harm my PC? I'm mainly concerned with removing a user or group that i need and not being able to add it back with everything it needs...

Shutting down services
Code:
	/etc/rc.d/rc.S:
	  Lines 171-175:  comment out isapnp.conf
	  Lines 193-195:  comment out rc.pcmcia

	/etc/rc.d/rc.M:
	  Lines 50-53:  comment out lpd
	  Line 67:  comment out atd
	  Lines 117-122:  comment out apmd
	  Lines 141-143:  comment out rc.ibcs2
	  #Lines 146-148:  comment out rc.httpd
	  Lines 155-157:  comment out samba

	/etc/rc.d/rc.4:
	  Line 23 add: -udpPort 0

	/etc/rc.d/rc.inet2:
	  Line 22:  IPV4_FORWARD=0
	  Lines 48-51:  comment out rpc.portmapper
	  Lines 83-88:  comment out inetd
	  Lines 108-110:  comment out rc.nfsd
	  Lines 114-117:  comment out lpd

	/etc/rc.d/:
          chmod -R go-rwx /etc/rc.d
	  chmod 600 /usr/lib/news/bin/rc.news

	/etc/inetd.conf:
	  grep -v "^#" /etc/inetd.conf
	  Comment the results


	/etc/orbitrc:
	  ORBIIOPUSock=1
	  ORBIIOPIPv4=0
	  ORBIIOPIPv6=0

	/usr/X11R6/bin/startx:
	  serverargs="-nolisten tcp"

Removing users and groups
Code:
	/etc/shells:
	  Delete the following:
		/bin/csh
		/bin/ksh
		/bin/zsh
	  Add the following:
	        /bin/sh
	        /bin/false


	/etc/passwd & /etc/shadow:
	  Delete the following:
	        adm
	        uucp
		operator
	
	  Add /bin/false as the shell to the following:
	        bin
	        daemon
	        ftp
		games
		lp
		mail
	        mysql
		news
	        http
	        nobody

	  Note: Don't run these if you like to make the passwd and shadow
	        file immutabled (chattr +i ...).  It gets ugly.
	  /usr/bin/passwd -x 30 -w 7 root
	  /usr/bin/passwd -x 30 -w 7 dentonj


	/etc/group:
	  Delete the following:
	        adm
	        lp
	        uucp

	  /usr/sbin/pwck
	  /usr/sbin/grpck


	  The above may create a long list of programs that no longer
	  belong to any group.
	    find / -nouser -o -nogroup -ls > nouser
	    chown root.root <the results>

	/etc/sudoers:
	  ALL ALL=/usr/local/sbin/logit
	  ALL ALL=/usr/bin/tail
 
Old 11-18-2003, 12:18 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Haven't seen anything weird, but then again I don't use Slack. Making backups and permission listings or using filesystem integrity app comes in handy... Before commenting services out, you better deinstall SW you don't need. Easier, saves doing upgrades and curbs risks. BTW, I hope this is not the only filesystem hardening you'll be doing, right?
 
Old 11-18-2003, 12:45 AM   #3
Jiggy
Member
 
Registered: Nov 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks, just out of curiosity what the adm user/group for? I've tried searching google with various keywords but theres just to many irrelevant results that comes up.

"BTW, I hope this is not the only filesystem hardening you'll be doing, right?"
Nope, i'm going through the links on your stickey thread now... Great post
 
Old 11-18-2003, 11:41 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Thanks, just out of curiosity what the adm user/group for?
Historically, the group that owns part of the administration trail, logfiles, it's home being /var/adm. Think /var/adm/messages, /var/adm/wtmp and on. Since the FSSTND deprecated in favour of /var/log.
 
Old 11-18-2003, 01:11 PM   #5
Jiggy
Member
 
Registered: Nov 2003
Posts: 36

Original Poster
Rep: Reputation: 15
I just added the removal of that user/group to my to-do list.... thank you
 
  


Reply



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
cleaning up. Removing packages that are unnecessary. microsoft/linux Debian 6 10-20-2005 10:35 AM
Which services are unnecessary? revenant Linux - Security 4 03-28-2004 11:43 PM
Unnecessary Services/Daemons loaded at boot t3___ Linux - Newbie 1 02-27-2004 05:22 PM
Speeding up boot by stopping unnecessary services hamish Linux - Software 2 09-09-2003 03:11 PM
Speeding up boot by stopping unnecessary services hamish Linux - Software 1 09-09-2003 08:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:10 AM.

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