su:/bin/bash permission denied
list Michael Ciccone
Hello,
New to Hobbit...
I cannot start hobbit via the service command. When I try I get the
following error:
I type: service hobbit start
Error is:
Starting hobbit: su:/bin/bash permission denied.
When I tried to do this manually it works fine.
#su - c "/usr/lib/hobbit/service/hobbit.sh start" - hobbit
Any help is much appreciated
Mike
Here is my /etc/init.d/hobbit.sh file:
#! /bin/sh
#
# hobbit This shell script takes care of starting and stopping
# hobbit(the Hobbit network monitor)
#
# chkconfig: 2345 80 20
# description: hobbit is a network monitoring tool that allows \
# you to monitor hosts and services. The monitor status is available \
# via a webpage.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/lib/hobbit/server/hobbit.sh
NAME=hobbit
DESC=hobbit
test -x $DAEMON || exit 0
# Include hobbit defaults if available
if [ -f /etc/default/hobbit ] ; then
. /etc/default/hobbit
fi
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
su -c "$DAEMON start" - hobbit
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
su -c "$DAEMON stop" - hobbit
echo "$NAME."
;;
reload|force-reload)
echo "Reloading $DESC configuration files."
su -c "$DAEMON reload" - hobbit
echo "$NAME."
;;
restart)
echo -n "Restarting $DESC: "
su -c "$DAEMON restart" - hobbit
echo "$NAME."
;;
rotate)
echo -n "Rotating logs for $DESC: "
su -c "$DAEMON rotate" - hobbit
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
list Etienne Roulland
Hi,
Error is: Starting hobbit: su:/bin/bash permission denied.
Can you make a "grep hobbit /etc/passwd" ? Etienne
list Michael Ciccone
hobbit:x:501:501:Hobbit user:/usr/lib/hobbit:/bin/bash -----Original Message----- From: Etienne Roulland [mailto:user-318b6b240fb9@xymon.invalid] Sent: Monday, February 27, 2006 2:37 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] su:/bin/bash permission denied Hi,
Error is: Starting hobbit: su:/bin/bash permission denied.
Can you make a "grep hobbit /etc/passwd" ? Etienne
list Dan Vande More
Your path names are incorrect. You said: #su - c "/usr/lib/hobbit/service/hobbit.sh start" - hobbit works. However, you have: DAEMON=/usr/lib/hobbit/server/hobbit.sh in your script. p.s. /usr/lib seems like a crazy place to put software, but that's just my opinion. Good luck, Dan
▸
On 2/27/06, Michael Ciccone <user-0f48d58fda03@xymon.invalid> wrote:hobbit:x:501:501:Hobbit user:/usr/lib/hobbit:/bin/bash -----Original Message----- From: Etienne Roulland [mailto:user-318b6b240fb9@xymon.invalid] Sent: Monday, February 27, 2006 2:37 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] su:/bin/bash permission denied Hi,Error is: Starting hobbit: su:/bin/bash permission denied.Can you make a "grep hobbit /etc/passwd" ? Etienne
list Michael Ciccone
That's a typo... It should read... /usr/lib/hobbit/service for both. As far as location "/usr/lib".. This is where the rpm installed the software. But your right I should move it. Thanks
▸
-----Original Message-----
From: Dan Vande More [mailto:user-f3c4c62d9d50@xymon.invalid]
Sent: Monday, February 27, 2006 4:50 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] su:/bin/bash permission denied
Your path names are incorrect.
You said:
#su - c "/usr/lib/hobbit/service/hobbit.sh start" - hobbit works.
However, you have:
DAEMON=/usr/lib/hobbit/service/hobbit.sh
▸
in your script.
p.s. /usr/lib seems like a crazy place to put software, but that's just
my opinion.
Good luck,
Dan
On 2/27/06, Michael Ciccone <user-0f48d58fda03@xymon.invalid> wrote:hobbit:x:501:501:Hobbit user:/usr/lib/hobbit:/bin/bash -----Original Message----- From: Etienne Roulland [mailto:user-318b6b240fb9@xymon.invalid] Sent: Monday, February 27, 2006 2:37 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] su:/bin/bash permission denied Hi,Error is: Starting hobbit: su:/bin/bash permission denied.Can you make a "grep hobbit /etc/passwd" ? Etienne
list Dan Vande More
What does: $ ls -lad /usr/ /usr/lib/ /usr/lib/hobbit/ /usr/lib/hobbit/server Give you?
▸
On 2/27/06, Michael Ciccone <user-0f48d58fda03@xymon.invalid> wrote:That's a typo... It should read... /usr/lib/hobbit/service for both. As far as location "/usr/lib".. This is where the rpm installed the software. But your right I should move it. Thanks
list Michael Ciccone
ls -lad /usr drwxr-xr-x 14 root root 4096 Feb 15 09:54 /usr ls -lad /usr/lib drwxr-xr-x 111 root root 81920 Feb 17 04:03 /usr/lib ls -lad /usr/lib/hobbit drwxr-xr-x 7 root root 4096 Feb 27 13:32 /usr/lib/hobbit ls -lad /usr/lib/hobbit/server drwxr-xr-x 4 root root 4096 Feb 27 13:52 /usr/lib/hobbit/server
▸
-----Original Message-----
From: Dan Vande More [mailto:user-f3c4c62d9d50@xymon.invalid] Sent: Monday, February 27, 2006 5:08 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] su:/bin/bash permission denied
What does:
$ ls -lad /usr/ /usr/lib/ /usr/lib/hobbit/ /usr/lib/hobbit/server
Give you?
On 2/27/06, Michael Ciccone <user-0f48d58fda03@xymon.invalid> wrote:That's a typo... It should read... /usr/lib/hobbit/service for both. As far as location "/usr/lib".. This is where the rpm installed the software. But your right I should move it. Thanks