Originally posted by Blu-star
...i went to /etc/rc.d and i saw there was a file called rc.sendmail there, i did a chmod ugo-rwx on that file, and after that it hasnīt started, is this the real way to do this? if not, how should i do?...
Not quite. You only need to remove the executable bit (x) to stop a service from starting, not all the permissions. In the /etc/rc.d directory (in Slackware at least), list the directory with the -l option ( ls -l /etc/rc.d ). the default permissions for a service with the x permission removed would look like this:
-rw-r--r-- 1 root root
while the ones that do start at boot would look like this:
-rwx-r-xr-x 1 root root
What you're doing with that particular chmod command is locking all users out of those bootup scripts, including root, which will make it look like this (you won't even be able to open up the file to look at it):
---------- 1 root root
To restore any files you may have locked, you can run this command:
chmod a+r /etc/rc.d/* ; chmod u+w /etc/rc.d/*
None of the other files will be affected. Only the files with all permissions removed (the locked ones) will be restored without setting the x bit.
The correct command to stop a service starting at boot would be:
chmod a-x /etc/rc.d/<filename>
(Notice that you can use 'a' in the command instead of 'ugo' to accomplish the same thing)
NOTE: Using chmod will prevent/allow services starting during boot globally, ie., regardless of runlevel. If you only want to change it for a particular runlevel, then use the method outlined by MartinN. Only, I would just comment out the desired service (not remove it) in case you may change your mind in the future.