Usr/sbin/service 123 Exec Status Not Found Easy Solution

You may encounter an error message saying that usr/sbin/service 123 exec was not found. Coincidentally, there are a number of steps you can take to fix this issue. We will return to this shortly.

  • Start/stop Ssh Crontab

    Hi, because I’m running a 12.04 LTS site and want to improve the ssh switch in the corresponding crontab to open my own little window to connect my backup (via rsync/ssh).

    I thought it would be as easy as putting

    Start SSH service
    SSH Stop Service

    crontabs has the correct basic issues (using “crontab -e” as root), but when you do this you get an email from crontab, the master daemon, that says:

    /usr/bin/service:123:admin:startup:not found

    I also use “/etc/init.d/ssh start” (/stop), above error

    So I tried hooking into my own bash script if you want to properly initialize the shell:

    —-startssh.sh—–
    #!/bin/bash
    Source /etc/profile
    Start SSH service
    ———————-

    and, in turn, some emails contain the same error:

    /usr/bin/service:123:exec:startup:not found

    What am I doing wrong?? How can I start/stop ssh at specific times in the “normal way”? I couldwould have just run “/usr/sbin/sshd -D” myself, but figured it would be better to use basic startup/shutdown scripts…

    Thank you!
    James

  • Re: Start/stop Ssh Outside Of Crontab

    Entries in crontab do not reach the full environment set to #1. Try:

    Code:

    /usr/sbin/service ssh start

    and

    Code:

    /usr/sbin/service ssh stop

    Cheese mill

  • Re: Start/stop SSH From Original Crontab

    Published

    cheese mill

    Crontab entries do not have a full weather configuration. Try ssh with:

    usr/sbin/service 123 exec status not found

    Code:

    /usr/sbin/servicestart

    and

    Code:

    /usr/sbin/service ssh stop

    Same, /usr/bin/service will just be a symlink to /usr/sbin/service

    I know it’s going through the service script, but it’s actually something in the service package that’s failing (eg.(name, start or work) because it didn’t initialize the correct placement… I thought it produced that “source/etc probably enough?

    /usr/sbin/service:123:exec:start: not actually found

  • Re: Start/stop Ssh From Crontab

    Hello lightbox.

    It’s always difficult.

    Each “crontab” has a limited environment, including a very short path. While “service” is actually on this very simple path, “service” is actually a nice script that calls other scripts.

    start, stop, and status may not be real options, but various other programs still live in /sbin, which is sometimes not the crontab path.

    You can top it up yourself by doing the following:

    Code:

    $ /sbin/stop mark vii /sbin/start /sbin/status/sbin/start /sbin/status /sbin/stop

    An easy solution is to expand your network access crontab path to include /sbin. For example:

    Code:

    #Miriel X Dom Dow Wednesday orderPATH=/usr/sbin:/usr/bin:/sbin:/bin*/1 (empty) * ** stop mysql service

    Hope this helps and let us know how it goes.
    Hello.

  • Re: Start/stop Ssh Via Crontab