[CentOS] 'service' command not present

Kenneth Porter shiva at sewingwitch.com
Mon Aug 20 21:02:08 UTC 2007


On Monday, August 20, 2007 10:56 PM +0200 Ralph Angenendt 
<ra+centos at br-online.de> wrote:

> Trey Sizemore wrote:
>> I just did an install of CentOS 5 on one of my machines.  However, when
>> I try to use the 'service' command (such as 'service httpd start') I get
>> an error that the service command is not found.
>
> It's "su -", not just "su" - see the su and the bash man pages for an
> explanation.

One of the routine edits I do to /etc/profile is to add the sbin 
directories to all users' path. I don't see value in keeping those 
directories out of the path. I suppose in a more coddling environment one 
could invoke pathmunge only for those users in a power users group. (The 
edit is to comment out the "if" and "fi".)

# Path manipulation
# [KAP] add sbin to all users' paths
#if [ "$EUID" = "0" ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
#fi




More information about the CentOS mailing list