ZM 1.22.0 Problems with shared memory. And su.

Support and queries relating to all previous versions of ZoneMinder
Locked
r0y
Posts: 17
Joined: Tue Feb 07, 2006 11:58 am

ZM 1.22.0 Problems with shared memory. And su.

Post by r0y »

Hi i've got some problems with 1.22.0 here are the erros:

Feb 7 13:56:47 surveilance zmpkg[21249]: ERR [Unable to find valid 'su' syntax]

And lots of these:

Feb 7 13:58:26 surveilance zmu[21340]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]

I've tryed to increase memory now its:

shmall: 154217728
shmmax: 154217728

How much memory do i have to set here and how to fix the invalid syntax?


/Roy
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Can you tell us what distro you are using?
Phil
r0y
Posts: 17
Joined: Tue Feb 07, 2006 11:58 am

Post by r0y »

Sorry, its a fresh gentoo install.
r0y
Posts: 17
Joined: Tue Feb 07, 2006 11:58 am

Post by r0y »

Any one got a ide? I need to get this setup up and running becasue i want to se if those ppl in the appartment downstairs are stealing food from us.. hehe
User avatar
tech_fixer
Posts: 132
Joined: Tue Jul 29, 2003 3:07 pm

Post by tech_fixer »

My best advice: use a more thoroughly tested Linux distribution as your plattform. I'm using Fedora Core 4 and it works wonderfully. Only took me 2 hours to set everything up from scratch.

And with Cordel's RPM, it should be even a quicker install!

Regards,
Jose.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

There are plenty of people running ZM on gentoo so I'm a little surprised why you are getting the su error. Can you edit your installed zmpkg.pl and change the value of DBG_LEVEL to 1. Then try and start ZM and post the relevant parts of your zmpkg.log file.
Phil
r0y
Posts: 17
Joined: Tue Feb 07, 2006 11:58 am

Post by r0y »

tech_fixer wrote:My best advice: use a more thoroughly tested Linux distribution as your plattform. I'm using Fedora Core 4 and it works wonderfully. Only took me 2 hours to set everything up from scratch.

And with Cordel's RPM, it should be even a quicker install!

Regards,
Jose.

Well i don't like RedHat/Fedora, and found that the only distro i like is gentoo, i did however try the Livecd but i didn't get any picture. And all of my computers witch is runnig linux is running gentoo :)
r0y
Posts: 17
Joined: Tue Feb 07, 2006 11:58 am

Post by r0y »

Ok with debug level 1 here it is:

/var/log/messages


Feb 8 22:48:38 surveilance zmpkg[25194]: INF [Command: start]
Feb 8 22:48:38 surveilance su(pam_unix)[25197]: session opened for user apache by (uid=0)
Feb 8 22:48:38 surveilance su(pam_unix)[25197]: session closed for user apache
Feb 8 22:48:38 surveilance su(pam_unix)[25199]: session opened for user apache by (uid=0)
Feb 8 22:48:38 surveilance su(pam_unix)[25199]: session closed for user apache
Feb 8 22:48:38 surveilance zmpkg[25194]: ERR [Unable to find valid 'su' syntax]

zmpkg.log

02/08/06 22:48:38.813011 zmpkg[25194].INF [Command: start]
02/08/06 22:48:38.828974 zmpkg[25194].DBG [Testing valid shell syntax]
02/08/06 22:48:38.829740 zmpkg[25194].DBG [Testing 'su apache -c 'true'']
02/08/06 22:48:38.944176 zmpkg[25194].DBG [Test failed, '']
02/08/06 22:48:38.944717 zmpkg[25194].DBG [Testing 'su apache --shell=/bin/sh --command='true'']
02/08/06 22:48:38.970428 zmpkg[25194].DBG [Test failed, '']
02/08/06 22:48:38.970922 zmpkg[25194].ERR [Unable to find valid 'su' syntax]
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

r0y wrote:su apache -c 'true'
su apache --shell=/bin/sh --command='true''
Can you try those two commands interactively and post what you get.
Phil
r0y
Posts: 17
Joined: Tue Feb 07, 2006 11:58 am

Post by r0y »

I tihnk i know whats wrong

su apache --shell=/bin/sh --command='true'' <- one too many of '

Here is goes:

surveilance zoneminder # su apache -c 'true'
surveilance zoneminder # su apache --shell=/bin/sh --command='true''
>

surveilance zoneminder # su apache --shell=/bin/sh --command='true'
surveilance zoneminder #
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I think that was just me making a cut'n'paste typo. Actually what we need to know is whwther the command succeeded, so try this

Code: Select all

su apache -c 'true'
echo $?

su apache --shell=/bin/sh --command='true'
echo $?
Phil
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

The apache user may need a shell defined? The default Gentoo install sets apache's shell to /bin/false.
Rick Hewett
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Yes, I think I'll change this for 1.22.1 to fork and exec instead.
Phil
r0y
Posts: 17
Joined: Tue Feb 07, 2006 11:58 am

Post by r0y »

Thats nice, but any workarounds now? Cause i really need this up and running :)
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Try using vipw to edit /etc/passwd, changing

Code: Select all

apache:x:81:81:apache:/www:/bin/false
to

Code: Select all

apache:x:81:81:apache:/www:/bin/bash
Rick Hewett
Locked