LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-06-2003, 08:57 PM   #1
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302
Blog Entries: 4

Rep: Reputation: Disabled
Question Disabling Startup Services


'm trying to find an easy way to disable the services that start each time the system boots. I know in RedHat, there's a semi-gui interface invoked via the sysvinit command and wanted to know if something comparable existed for Slackware. I don't want to have to comment each line in the /etc/services out for obvious reasons. I've checked the /etc/rc.d/rc.local, /etc/rc.d/rc.M files for these same startup processes and am not having much luck. My nmap 127.0.0.1 shows the following information:

Interesting ports on localhost (127.0.0.1):
(The 1644 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
37/tcp open time
53/tcp open domain
79/tcp open finger
80/tcp open http
113/tcp open auth
587/tcp open submission
631/tcp open ipp
953/tcp open rndc
6000/tcp open X11
10000/tcp open snet-sensor-mgmt

I know this spells trouble. I tried running /usr/share/zsh/4.0.7/functions/_chkconfig as root, but I get permission denied. I'm not even sure if this is a legitimate command or not. I'm running Slack 9.1. Any information would be awesome!
 
Old 11-06-2003, 09:16 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
I'm fairly sure that the /etc/services file just lists what kind of services are offered on various port numbers, and should not be edited. To see what is being started when you boot, go into a console and (as root) type:

chkconfig --list

(chkconfig should be a normal command available from /sbin). This shows all the services that chkconfig knows about (which should be most everything in /etc/rc.X, I believe), and whether they are run at a particular runlevel. To turn one off, type:

chkconfig -del nameofservice

Check out the chkconfig man page for other syntax, like how to disable stuff just for a particular runlevel. Hope this helps!
 
Old 11-07-2003, 12:20 AM   #3
linuxJaver
Member
 
Registered: Jul 2003
Location: Jakartax, ID
Distribution: slack9.1+,9.1,rh9
Posts: 203

Rep: Reputation: 30
I'm also quite annoyed by this issue as well as the initialization of the commands search path during the booting time.

I've introduced a concept for flexibly processing of the global applications in /etc/profile.d (which determine which search path slack has when it is up) as well as for processing the services/scripts on /etc/rc.d/rc.* (which also determine the starts of some services during the start up).

The current state of art how slack(s) do that is only by proofing the execution permission of those scripts, then execute/process them easily without possibility for user/administrator for controlling which to start and how the order to start them.

The only possibility is to change the execute permission which resulted that the service also not to be started without to change back the permission (unclean were to have other copies with execution permission of those scripts somewhere) ..

I suggest to have a config file (like /etc/applrc) for processing the applications in /etc/profile.d which contains the application names in the order they should be processed.

Also to have a config file (like /etc/rc.d/rc.rc) that contain the service names in the order they should be started during the boot time, so that those script on /etc/rc.d can be made all executable, so that user have the possibility to "start | stop | restart" them any time later ..

For more u can also read it from this link below :

http://www.userlocal.com/phorum/read...79#reply_17279

Last edited by linuxJaver; 11-07-2003 at 12:25 AM.
 
Old 11-07-2003, 12:25 AM   #4
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
For example:

chmod a-x rc.samba

chmod a-x rc.pcmcia

(remember these files are in /etc/rc.d/ - so you'd want to cd into that directory first)

Last edited by Skyline; 11-07-2003 at 12:29 AM.
 
Old 11-07-2003, 10:37 AM   #5
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302

Original Poster
Blog Entries: 4

Rep: Reputation: Disabled
WOW! Thanks guys! From all the stuff ya'll have told me, it still seems as if things could be made much easier by incorporating a utility that would effectively toggle startup services on/off. Do you all think I should email the Slackware authors about including such a utility in future releases or are you all perfectly content to have to do all this stuff?
 
Old 11-07-2003, 04:40 PM   #6
linuxJaver
Member
 
Registered: Jul 2003
Location: Jakartax, ID
Distribution: slack9.1+,9.1,rh9
Posts: 203

Rep: Reputation: 30
Below file could be a simple example tool u meant (atually it is a bash shell aliases/shortcuts), but those files on /etc/rc.d/rc.<scripts> must be executable first, since no shell scripts will run if the execute bits/permission is not activated.

Quote:
#!/usr/bin/bash
# file: /etc/profile.d/alias1.sh

alias a=alias
a c=clear
a s=source
a m=more
a nst='clear;netstat -van'
a ia='clear;/sbin/ifconfig -a'
a lii='clear;ls -l /etc/dhcpc;cat /etc/dhcpc/dhcpcd-eth1.info'
a ip='head -n 1 /etc/dhcpc/dhcpcd-eth1.info|cut -b 8-'

# rc.inet1 things
a ria='/etc/rc.d/rc.inet1 start;sleep 2;ia'
a rio='/etc/rc.d/rc.inet1 stop'
a rir='/etc/rc.d/rc.inet1 restart;sleep 2;ia'

# httpd things
a ph='ps -ax|grep httpd'
#a rha='/etc/rc.d/rc.httpd start;sleep 1;netstat -va'
a rha='/etc/rc.d/rc.httpd start'
a rho='/etc/rc.d/rc.httpd stop'
a rhr='/etc/rc.d/rc.httpd restart;sleep 1;netstat -va'

# named things
a pn='ps -ax|grep named'
a rba='/etc/rc.d/rc.bind start'
a rbo='/etc/rc.d/rc.bind stop'
a rbr='/etc/rc.d/rc.bind restart'
a rbs='/etc/rc.d/rc.bind status'

# enable ip_forward risking lan ?
a rfs='cat /proc/sys/net/ipv4/ip_forward'
a rfa='/etc/rc.d/rc.ip_forward start'
a rfo='/etc/rc.d/rc.ip_forward stop'
a rfr='/etc/rc.d/rc.ip_forward restart'

a rsa='/etc/rc.d/rc.samba start;sleep 1;netstat -va'
a rso='/etc/rc.d/rc.samba stop'
a rsr='/etc/rc.d/rc.samba restart;sleep 1;netstat -va'

# stuff for checking 2nic devices status, ineternet connection
a e0up='/sbin/ifconfig eth0 10.1.1.1 broadcast 10.1.1.255 netmask 255.255.255.0;sle
ep 2;ifconfig -a'
a e0down='/sbin/ifconfig eth0 down;sleep 2;ifconfig -a'
a e1upn='/sbin/dhcpcd -t 10 -l 1209600 -d eth1;sleep 2;route -n'
a e1up='/sbin/dhcpcd -t 10 -R -d eth1;sleep 2;route -n'
a e1down='/sbin/dhcpcd -k -d eth1;sleep 2;route -n'
 
Old 11-07-2003, 05:21 PM   #7
GrayGhost
LQ Newbie
 
Registered: Jul 2003
Location: State of confusion (Wisconsin)
Distribution: Slackware 10.2 and Current
Posts: 29

Rep: Reputation: 15
This thread might also give you some ideas
http://www.linuxquestions.org/questi...=stop+services
I was able to get my box setup so that nothing is listening.

Good Luck
GG
 
Old 11-07-2003, 09:36 PM   #8
linuxJaver
Member
 
Registered: Jul 2003
Location: Jakartax, ID
Distribution: slack9.1+,9.1,rh9
Posts: 203

Rep: Reputation: 30
Some services on /etc/inetd.conf are possible security holes:
I've commented auth ftp tftp fingerd ..

I was often surprised of some poky poky on /var/log/secure
Some time the computer also slowdown like am not the only
working on my computer, and my local time was changed 2
days in future ..

I need some time spending on hardening the box, but I hate it
when thing not works later ..
 
  


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
Disabling the Services for security wardialer Linux - Security 1 03-20-2005 08:49 PM
disabling stopping services ganxteh Fedora 6 12-17-2004 10:24 PM
Disabling startup services Corallis Fedora 2 08-02-2004 11:51 AM
Advice for disabling some of the services from /etc/rc.d oldi Slackware 3 07-17-2004 05:51 PM
disabling services on RH 8.0 juanb Linux - General 2 03-19-2003 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:06 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