BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: {bb} BBPID's owner is root



Hi

Can't say specifically what you have wrong, but I run on Solaris 9 and
don't have an issue with this. I have enclosed my brief bb server
install notes, so perhaps you can see a difference between what you have
done and myself. I am not that experienced with BB, so perhaps I am not
doing everything the best way, but hope it helps.



Inst Big Brother Thu May 27 14:43:04 2004
=========================================
This was on sunmgr01 running Solais 9

Installed gcc

Downloaded BB package (src) from www.bb.com
bb-1.9e.tar.gz

Created a user: bb, group: bb, home dir: /export/home/bb, added to
/etc/auto_home

Apache is already installed.

Had to configure it:
cd /etc/apache
cp -p httpd.conf-example httpd.conf
Changed (well will change)
Started the daemon with:
/etc/init.d/apache start
Need to setup security so that only 10.1.14.XXX IPs can access its web
pages.

Now to install
--------------
As bb user
In home dir
gunzip bb-1.9e.tar.gz
tar xvf bb-1.9e.tar
 extracts:
 BB.README.FIRST
 BBCLT-bbc1.9e-btf.tar
 BBSVR-bb1.9e-btf.tar

Extract the server (creates the bb1.9e-btf dir)

Extract the client (creates the bbc1.9e-btf dir)

Inst server part 1st as root
As root
cd bb1.9e-btf
cd install
./bbconfig solaris

---> We'll configure for solaris...

        Big Brother needs it's own user id.  If your BB user doesn't
exist, 
        you'll have to create it then re-run bbconfig.
        
What will be the user ID for BB [bb]: 
---> BB will only run from user 'bb'

        Making sure BBHOME </export/home/bb/bb1.9e-btf> is writable...

---> OK, /export/home/bb/bb1.9e-btf is fine...


        When you set up your machines, you should use Fully Qualified
        Domain names, this means you use the whole name, like
www.bb4.com,
        instead of just 'www'.  This is recommended.

Use FQDN (y/n): [y] 
---> Good, we'll use FQDN


        Big Brother creates HTML pages with the status of your network.
        You'll need a web server to publish this information.
        
What host will be the BBDISPLAY [sunmgr01]: sunmgr01.justice.qld.gov.au
---> OK... sunmgr01.justice.qld.gov.au will be a BBDISPLAY

        Big Brother sends important messages to a pager server.  This
        machine will at a minimum to be able to send mail.
        
What host will be the BBPAGER [sunmgr01.justice.qld.gov.au]: 
---> OK... sunmgr01.justice.qld.gov.au will be a BBPAGER

        Some questions regarding the current host
        (sunmgr01) will be asked.


Is this host a BBDISPLAY host (y/n): [y] 

Is this host a BBPAGER host (y/n): [y] 

Enter the default e-mail address to send notifications to:
[root@sunmgr01] 

        Since Big Brother produces results to be displayed on web
        pages, we need to know where to view these results.
        
Enter the base URL for BB [/bb]: 
---> OK... Big Brother will live under
http://sunmgr01.justice.qld.gov.au/bb

        Big Brother also uses CGI scripts to create dynamic output.
        What directory do these scripts live in?

Enter CGI directory [/home/www/httpd/cgi-bin]: /var/apache/cgi-bin
---> OK... CGI scripts will live at /var/apache/cgi-bin

Enter the base URL of the CGI scripts [/cgi-bin]: 
---> OK... The base URL location of CGI scripts is in /cgi-bin


--------------------------------------------------------

--> UPDATING runbb.sh
--> UPDATING bbsys.local
--> CHECKING COMMAND PATHNAMES
*** Verifying pathnames to necessary commands...
DIG is unavailable, the directive "dig" cannot be used in bb-hosts
*** The following changes need to be made...
        --> /usr/local/bin/dig changed to /usr/sbin/dig
*** Making changes...

*** We've noticed that we've set some of the pathnames wrong
*** by default here.  May we mail a summary of the paths we
*** missed back to info@bb4.com so we can update our installs?
[y/n]
n
*** Done.
--> UPDATING bbdef.sh
--> UPDATING URL location
--> INSTALLING CGI scripts
Overwrite the current version of /var/apache/cgi-bin/bb-hist.sh (y/n)?:
y
Overwrite the current version of /var/apache/cgi-bin/bb-histlog.sh
(y/n)?: y
Overwrite the current version of /var/apache/cgi-bin/bb-ack.sh (y/n)?: y
Overwrite the current version of /var/apache/cgi-bin/bb-hostsvc.sh
(y/n)?: y
Overwrite the current version of /var/apache/cgi-bin/bb-rep.sh (y/n)?: y
Overwrite the current version of /var/apache/cgi-bin/bb-replog.sh
(y/n)?: y

        BB needs to set the group name of the www/rep directory
        to the group name of the web server by using its user name

Enter web server user id [nobody]: 

        You may override the group name determined by the previous step.

Enter group name [nobody]: 

--> SETTING WRITE PERMISSION FOR OWNER AND GROUP FOR www/rep
--> CHANGING THE GROUP ID OF www/rep
--> UPDATING pager scripts

--------------------------------------------------------


--------------------------------------------------------

--> Done.  Now do
                chown -R bb /export/home/bb/bbvar
/export/home/bb/bb1.9e-btf
                su - bb
                        to continue installation using that user ID

Now compile Big Brother

                cd /export/home/bb/bb1.9e-btf/src
                make
                make install

--------------------------------------------------------

# 
# chown -R bb /export/home/bb/bbvar /export/home/bb/bb1.9e-btf
# su - bb
Sun Microsystems Inc.   SunOS 5.9       Generic May 2002
$ cd /export/home/bb/bb1.9e-btf/src
$ 
!!! May or May not need the next 2 lines !! 
$ CC=/usr/local/bin/gcc
$ export CC

!!! So that make and gcc are pickedup !!!
$ PATH=$PATH:/usr/ccs/bin:/usr/local/bin
$ export PATH
$ 
$ pwd
/export/home/bb/bb1.9e-btf/src
$ 

!!! Made the following changes So that message file, prtdiag outputs etc
were not truncated:
~bb/src/bb.h
/* Increased next line for SLB from 8192 to 16384 - Trevor 20 Aug 04 */
#define MAXLINE  16384                  /* CHANGED FROM 256 - MAX LINE
SIZE */



$ make
$ make install
$ 
$ cd ../etc
$ pwd
/export/home/bb/bb1.9e-btf/etc
$ ls
bb-bbexttab.DIST        bbchkhosts.sh           bbdef-server.sh.DIST
bbinc.sh                bbwarnrules.cfg.DIST    security.DIST
bb-hosts                bbchkwarnrules.sh       bbdef.sh
bbsys.local             bbwarnsetup.cfg         sms.scr
bbchkcfg.sh             bbchkwarnrules.sh.DIST  bbdef.sh.DIST
bbsys.sh                numeric-k6.scr
bbchkcmds.sh            bbdef-server.sh         bbinc-server.sh
bbwarnrules.cfg         numeric.scr
$ 
$ cp -p bb-hosts bb-hosts.orig
$ vi bb-hosts
Edit:
/export/home/bb/bb1.9e-btf/etc/bb-hosts
 Commented out everything and added:
131.242.208.23 sunmgr01.justice.qld.gov.au # BBNET BBDISPLAY

!! DIDNT add 'PAGER' to above line as email is then sent to that server
as I found out !!

Check the file above with:
./bbchkhosts.sh

If any comments are displayed, please fix the entries in your
configuration

Note that some error messages may be for tags of external scripts

$ 

./bbchkcfg.sh
Checks the bbdef.sh/bbinc.sh/bbsys.sh source scripts for invalid entries
we get:
========================================================================
If any comments are displayed, please fix the entries in your
configuration

*** Verifying pathnames to necessary commands...
*** All pathnames OK.
bbwarnsetup.cfg: /dev/cuaa0 is an invalid entry in the ttyline token
                 This is a valid error only if this host is a BBPAGER
host
$ 
========================================================================
===
but as this is NOT a BBPAGER I ignored it.

In bb/etc/bbdef-server.sh, changed:
RUNOPTS="CONVHTMLTAGS"
to
RUNOPTS=""

Where:
CONVHTMLTAGS - If defined, Change HTML <> tags to &lt; and &gt; in
incoming status

As this cause the prtdiag script grief and also caused a muddled header
on
some reoprts.



cd ../..
ln -s bb1.9e-btf bb
This is useful as you don't have to change the directory in your
startup script. (see later)

Do a link
# pwd
/var/apache/htdocs
# ln -s /u1/bb/bb1.9e-btf/www bb

cd bb (the link bb)
$ ./runbb.sh start
Starting Big Brother
        Starting Big Brother Daemon (bbd)...
        Starting Network tests (bb-network)...
        Starting Display process (bb-display)...
Big Brother 1.9e started
$


Examine the BBOUT file for any errors. By default the BBOUT log file
is located in $BBHOME.  The location of BBOUT is defined by the value
of the BBOUT variable in bbdef.sh


You seemed to have to wait for the url:
http://sunmgr01.justice.qld.gov.au/bb/
to actually pickup anything.

Create a script for boot:
/etc/init.b/bb
========================================================================
=
#!/bin/sh
#
# Big Brother startup

PATH=$PATH:/bin:/usr/bin                # FOR su
BBHOME=/u1/bb/bb
BBUSER=bb

case "$1" in
start)
        su - $BBUSER -c "cd $BBHOME;./runbb.sh start"
        echo "Starting Big Brother"
        #&SLEEP
        ;;
restart)
        su - $BBUSER -c "cd $BBHOME;./runbb.sh restart"
        echo "Restarting Big Brother"
        #&SLEEP
        ;;
stop)
        su - $BBUSER -c "cd $BBHOME;./runbb.sh stop"
        echo "Stopping Big Brother"
        ;;
*)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
esac
exit 0
========================================================================
=

Hard link to rc dirs:
# cd /etc/rc3.d
# ln /etc/init.d/bb S91bb
# cd /etc/rc1.d
# ln /etc/init.d/bb K91bb

You should now have a web page:
http://sunmgr01.justice.qld.gov.au/bb/
with one servers listed: sunmgr01
and just 1 test 'conn' for connectivity (ping)



Notes - Servers
===============
To allow notes for servers (ie link to server information from the main
page)
need to:
~bb/bb/etc/bbdef-server.sh
put NOTESMSG into RUNOPTS, ie:
RUNOPTS="NOTESMSG"

Create a file using the server name, with a html extension, in
~bb/www/notes

Then stop and start bb.

 

Cheers
 Trevor


-----Original Message-----
From: owner-bb@bb4.com [mailto:owner-bb@bb4.com] On Behalf Of Asif Iqbal
Sent: Tuesday, 7 September 2004 1:09 AM
To: 'bb@bb4.com'
Subject: Re: {bb} BBPID's owner is root


On Fri, Aug 27, 2004 at 08:49:11AM -0500, Dobbs, Steve-CONT (CR) wrote:
> how are you becoming the bb user?  Are you logged in as root, then do
'su
> bb' , or do you 'su - bb'?  that might make a difference

su - bb

Before I start the runbb.sh I verified the user as bb

I also checked to see if any process is setuid to root and I did not
find any. Not sure how bb's pid file become root. The problem now is I
cannot stop bb since bb cannot read the pid file

> 
> -----Original Message-----
> From: Asif Iqbal [mailto:iqbala-bb@qwestip.net]
> Sent: Thursday, August 26, 2004 4:20 PM
> To: bb@bb4.com
> Subject: {bb} BBPID's owner is root
> 
> 
> Hi All
> 
> Has anyone experienced it? I tried to install bbc1.9e-btf on my
solaris
> twice to fix the issue and it is still doing the same thing
> 
> Everytime I start bb as bb the owner of BBPID on $BBTMP dir is
becoming
> root. I
> am not sure how to fix that.  
> 
> Thanks
> -- 
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> There's no place like 127.0.0.1
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
> To unsubscribe from this list, or to subscribe to the bb-digest list
> send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
> subscribe bb-digest in the BODY of the message.
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
> To unsubscribe from this list, or to subscribe to the bb-digest list
> send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
> subscribe bb-digest in the BODY of the message.

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"...it said: Install Windows XP or better...so I installed Solaris..."
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.



--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index