Author |
Message |
dwalton22
|
Posted: Fri Dec 09, 2005 10:43 pm |
|
Joined: Wed Mar 31, 2004 10:49 am
Posts: 10
|
I'm on a R5A26 install (a BIG thank you to everyone who works on KnoppMyth BTW, it is a life saver) and I upgraded to svn code. After the upgrade the backend no longer starts on bootup. I get the dreaded "Unable to set initgroups" error message. I've checked and I did not create another user account called mythtv:
mythtv@backend:/etc/init.d$ ./mythtv-backend start
Starting MythTV server: mythbackendstart-stop-daemon: Unable to set initgroups() with gid 105
mythtv@backend:/etc/init.d$
backend:/etc/init.d# grep mythtv /etc/passwd
mythtv:$1$GLU854Ty$NGBuJMMLs4jXBFBVAox9U/:105:105::/home/mythtv:/bin/tcsh
backend:/etc/init.d#
I tried adding mythtv to the root group, tried changing the group for the script mythtv-backend to mythtv, changed file ownership to mythtv, etc, etc but nothing works.
What group does the user "mythtv" need to be a member of?
Thanks
|
|
Top |
|
 |
cesman
|
Posted: Fri Dec 09, 2005 10:59 pm |
|
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location:
Fontana, Ca
|
Code: grep mythtv /etc/group Quote: cdrom:*:24:mythtv,cecil audio:!:29:mythtv,cecil video:!:44:mythtv,cecil mythtv:x:105:
_________________ cesman
When the source is open, the possibilities are endless!
|
|
Top |
|
 |
dwalton22
|
Posted: Fri Dec 09, 2005 11:21 pm |
|
Joined: Wed Mar 31, 2004 10:49 am
Posts: 10
|
Same thing here except I added mythtv to the root group while trying to figure this thing out.
backend:/etc# grep mythtv /etc/group
root:!:0:mythtv
cdrom:*:24:mythtv,dwalton22
audio:!:29:mythtv,dwalton22
video:!:44:mythtv,dwalton22
mythtv:x:105:
backend:/etc#
|
|
Top |
|
 |
dwalton22
|
Posted: Mon Dec 12, 2005 10:43 am |
|
Joined: Wed Mar 31, 2004 10:49 am
Posts: 10
|
|
Top |
|
 |
tiggermanh
|
Posted: Fri Dec 16, 2005 5:05 pm |
|
Joined: Thu Dec 15, 2005 3:56 pm
Posts: 7
|
You have to be root to run that command.
Sounds like you are running it from an xterm window.
Either su to root
or press ctrl shift F1 and login as root here and run the command.
_________________ Primary Backend
Dell PE750, 3Ghz, 1 GB Ram, 400GB Sata
pcHD 3000
FrontEnd
Dell GX270, ATI Video, 40 GB Disk.
Backend
Dual 1 GHZ, 512 RAM 200 GB Raid1
pdHD 30000
2nd Frontend
MBX 3 GHZ P4, 1 GB Ram
ATI video card. (unknown specs.)
|
|
Top |
|
 |
dwalton22
|
Posted: Fri Dec 16, 2005 11:59 pm |
|
Joined: Wed Mar 31, 2004 10:49 am
Posts: 10
|
My backend logs in under the mythtv user by default so I was trying to run the script as mythtv in an xterm (troubleshooting).
How do I tell my backend to login as root by default instead of mythtv?
|
|
Top |
|
 |
mjl
|
Posted: Sun Dec 18, 2005 6:55 pm |
|
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location:
Warwick, RI
|
Hi dwalton22,
I am not really clear as to the issues, however start with the obvious stuff first. Most problems begin with not having done the homework for $ mythtv-setup and the setups under the the Utilities menu. These are run as mythtv user.
Also, depending how you did your install, some directories may not have been created (happens when using manual install) goto http://mythtv.org and compare the list of what should be under /myth/ directories. Mine looks like this however yours will most likely be a little different:
sh-3.00$ ls -al /myth
total 76
drwxr-xr-x 16 mythtv mythtv 4096 Dec 16 16:56 .
drwxr-xr-x 25 root root 4096 Dec 16 23:26 ..
drwxr-xr-x 6 mythtv mythtv 4096 Dec 16 23:23 avimanager
drwxr-xr-x 2 mythtv mythtv 4096 Dec 17 13:38 backup
drwxr-xr-x 6 mythtv mythtv 4096 Dec 16 23:23 games
drwxrwxr-t 2 www-data www-data 4096 Dec 18 19:03 image_cache
drwx------ 2 mythtv mythtv 16384 Dec 16 23:21 lost+found
drwxr-xr-x 4 mythtv mythtv 4096 Dec 16 16:58 music
drwxr-xr-x 14 mythtv mythtv 4096 Dec 16 23:23 mythburn
drwxr-xr-x 8 mythtv mythtv 4096 Dec 16 23:23 nuv2disc
drwxr-xr-x 2 mythtv mythtv 4096 Dec 16 23:23 pretty
drwxr-xr-x 2 mythtv mythtv 4096 Dec 17 21:48 saytime
drwxr-xr-x 2 mythtv mythtv 4096 Dec 16 23:23 stream
drwxr-xr-x 9 mythtv mythtv 4096 Dec 18 18:26 tools
drwxr-xr-x 2 mythtv mythtv 4096 Dec 18 19:10 tv
drwxr-xr-x 4 mythtv mythtv 4096 Dec 16 23:24 video
Look in this log for some guidence,
less /var/log/mythtv/mythbackend.log or
tail -100 /var/log/mythtv/mythbackend.log for the last 100 entries.
These guys are more than willing to help but they need information to do so. Also 99% of the troubles have been covered about 10 times each, so don't be scared to do some searching trying out various key words. Sometimes they hide, so then ask for some supplemental assistance.
Hope this is helpful.
Have a great day!
Mikke
|
|
Top |
|
 |
dwalton22
|
Posted: Tue Dec 20, 2005 9:45 pm |
|
Joined: Wed Mar 31, 2004 10:49 am
Posts: 10
|
I finally figured it out, I needed to add
HOME=/home/mythtv
to the beginning of /etc/init.d/mythtv-backend
|
|
Top |
|
 |
sammo2828
|
Posted: Sat Feb 18, 2006 7:15 am |
|
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
|
I also get the same message:
mythtv@backend:/etc/init.d$ ./mythtv-backend start
Starting MythTV server: mythbackendstart-stop-daemon: Unable to set initgroups() with gid 105
mythtv@backend:/etc/init.d$
Can somebody please clarify whether user mythtv is supposed to be able to run /etc/init.d/mythtv-backend [restart | start] ??? I'm guessing not ...
Instead of adding user mythtv to the root group and adding HOME=/home/mythtv to the script as dwalton22 did, I added /etc/init.d/mythtv-backend to the /etc/sudoers file instead ...
This way, I can do:
mythtv@backend:/etc/init.d$ sudo /etc/init.d/mythtv-backend start
Starting MythTV server: mythbackend.
mythtv@backend:/etc/init.d$
Hope this helps ...
|
|
Top |
|
 |
tjc
|
Posted: Sat Feb 18, 2006 10:39 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
sammo2828 wrote: Can somebody please clarify whether user mythtv is supposed to be able to run /etc/init.d/mythtv-backend [restart | start] ??? I'm guessing not ...
No. Starting/stopping daemons from init.d is a job for root. HOWEVER, it should run the daemon as the mythtv user. (See the setting of the USER variable in your /etc/init.d/mythtv-backend script and the defaults file /etc/default/mythtv-backend that it sources for any overrides.) Did you try to get excessively clever and set /usr/bin/mythbackend setuid or setgid to root? What does this show on your machine?
Code: root@black2:~# ls -al /usr/bin/mythbackend -rwxr-xr-x 1 root root 781396 Jan 24 00:32 /usr/bin/mythbackend
|
|
Top |
|
 |
sammo2828
|
Posted: Sat Feb 18, 2006 5:56 pm |
|
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
|
hi tjc, thanks for the clarification ..
i didn't try to get "excessively clever" with setuid or setgid to root  .. the daemon still runs as the mythtv user ..
the reason why i needed to restart /etc/init.d/mythtv-backend from user mythtv is because of a problem i had with mythbackend crashing or misbehaving occasionally when changing channels (don't worry about why, it seems to be better with the new 0.19) ...
I also added the following to /etc/X11/fluxbox/keys
Code: Mod1 R :ExecCommand killall mythfrontend; mythfrontend Control Mod1 R :ExecCommand killall mythfrontend; sudo /etc/init.d/mythtv-backend restart; mythfrontend
This way, I can easily restart mythfrontend with alt-R and restart mythbackend AND mythfrontend with control-alt-R ...
|
|
Top |
|
 |
cesman
|
Posted: Tue Feb 21, 2006 1:00 am |
|
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location:
Fontana, Ca
|
Why would you do that when you could already start, stop and restart the backend with <alt><1>, <2> and <3> respectively?
_________________ cesman
When the source is open, the possibilities are endless!
|
|
Top |
|
 |
sammo2828
|
Posted: Tue Feb 21, 2006 4:20 am |
|
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
|
oooh  ... i'm still running R5A12 (with kernel and mythtv upgrades) 
|
|
Top |
|
 |
randomhtpcguy
|
Posted: Sun Mar 26, 2006 3:16 pm |
|
Joined: Mon Nov 07, 2005 10:09 am
Posts: 153
|
how can we start, stop, restart the master backend server?
I have to restart it often when my dvb card locks up.
|
|
Top |
|
 |
cesman
|
Posted: Sun Mar 26, 2006 3:20 pm |
|
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location:
Fontana, Ca
|
Look up.
_________________ cesman
When the source is open, the possibilities are endless!
|
|
Top |
|
 |