SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
'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!
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!
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 :
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?
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'
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 ..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.