Find the answer to your Linux question:
Results 1 to 6 of 6
I'm trying to figure out where the startup files are on a RH 7.x sys that was setup by someone else who has screwed up beyond belief the normal locations ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025

    Startup file(s) for services hosed up.


    I'm trying to figure out where the startup files are on a RH 7.x sys that was setup by someone else who has screwed up beyond belief the normal locations of file and names.

    What are the normal startup files for the services like httpd, sshd etc... and what is there names. The previous owner of the server seems to have redirected everying. So as a follow on question, what is the a command(s) that will open text files and search for a string to help me find it? Kinda like
    Code:
    find -name filename
    but for opening, reading and closing each txt file.
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284

    Re: Startup file(s) for services hosed up.

    Quote Originally Posted by fastlanwan
    What are the normal startup files for the services like httpd, sshd etc... and what is there names. The previous owner of the server seems to have redirected everying.
    On my RH 8 box, startup files are mainly in /etc/init.d/ also, you wil have some files in /etc/rc.d/ inside /etc/rc.d/ directory are folders called rc.*d where the * part is the run level the machine starts up in. Incase you have got different run levels, type
    Code:
    more /etc/inittab | more
    At the top of the file you will see a list of your run levels.

    On my RH box i have:
    # Default runlevel. The runlevels used by RHS are:
    # 0 - halt (Do NOT set initdefault to this)
    # 1 - Single user mode
    # 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
    # 3 - Full multiuser mode
    # 4 - unused
    # 5 - X11
    # 6 - reboot (Do NOT set initdefault to this)
    Hence, if when you swich your machine on, if you go to a CLI rather than a graphical screen for logon, your core startup files are in /etc/rc.d/rc.3d

    If you have a graphical login, your files are in /etc/rc.d/rc.5d

    Obviously, based on the runlevels on my system from the file /etc/inittab



    Quote Originally Posted by fastlanwan
    So as a follow on question, what is the a command(s) that will open text files and search for a string to help me find it? Kinda like
    Code:
    find -name filename
    but for opening, reading and closing each txt file.
    Not too sure on that one, darkstar may be able to help with that.

  3. #3
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    So if I'm looking to stop sshd from starting at bootup (RH7x) and the init file is in etc/init.d/sshd then where or what is the file that calls that file to start if sys starts with no gui? I see sshd referenced in rc3.d and some others as well.
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2003
    Location
    UK
    Posts
    21
    rc3.d is the normal multi user startup (non gui) bootup file in red hat at least.

    You can remove the start (eg S55sshd) instruction from there and that would stop the service starting.

    Personally though I would not recommend stopping sshd starting unless you always have and will never need anything other than local console access.

    In a normal environment I would always stop telnet from starting though and just let sshd start.

  6. #5
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    On the telnet vs ssh I would agree but it was just a example of where the services are coming from in a cmd line only mode. I did have a server I had to turn off ssh as well due to a bot(s) looking for a ssh1 opening. Even though I was on ssh2.

    Thanks,
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  7. #6
    Just Joined!
    Join Date
    Mar 2003
    Location
    UK
    Posts
    21
    No Problem

    Just Thought it better to double check that ssh thing rather than just to assume that you were using it as an example

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •