← Back to team overview

mythbuntu-bugs team mailing list archive

[Bug 511858] [NEW] mythvideo assumes passwd db is local

 

Public bug reported:

The /etc/cron.hourly/mythvideo jamu script assumes the mythtv user is
stored in /etc/passwd. An easy change will support any configured passwd
backend (ldap, nis etc):

# diff -u /etc/cron.hourly/mythvideo.orig /etc/cron.hourly/mythvideo
--- /etc/cron.hourly/mythvideo.orig	2010-01-24 02:27:13.866426860 -0800
+++ /etc/cron.hourly/mythvideo	2010-01-24 02:29:23.486429345 -0800
@@ -1,7 +1,8 @@
 #!/bin/sh
 #Hourly massive update to ensure users see graphics coming in for upcoming recordings and current recordings
-DIRECTORY=$(grep ^mythtv /etc/passwd | awk -F : '{print $6}')
+DIRECTORY=$(getent passwd mythtv | cut -d':' -f6)
 if [ -f "$DIRECTORY/.mythtv/config.xml" ]; then
     su mythtv -c "/usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW >> '/var/log/mythtv/jamu.log'"
 fi

Mythbuntu 9.10 / 0.22.0+fixes22594-0ubuntu1

** Affects: mythbuntu
     Importance: Undecided
         Status: New

-- 
mythvideo assumes passwd db is local
https://bugs.launchpad.net/bugs/511858
You received this bug notification because you are a member of Mythbuntu
Bug Team, which is subscribed to Mythbuntu.

Status in Mythbuntu, Ubuntu derivative focused upon MythTV: New

Bug description:
The /etc/cron.hourly/mythvideo jamu script assumes the mythtv user is stored in /etc/passwd. An easy change will support any configured passwd backend (ldap, nis etc):

# diff -u /etc/cron.hourly/mythvideo.orig /etc/cron.hourly/mythvideo
--- /etc/cron.hourly/mythvideo.orig	2010-01-24 02:27:13.866426860 -0800
+++ /etc/cron.hourly/mythvideo	2010-01-24 02:29:23.486429345 -0800
@@ -1,7 +1,8 @@
 #!/bin/sh
 #Hourly massive update to ensure users see graphics coming in for upcoming recordings and current recordings
-DIRECTORY=$(grep ^mythtv /etc/passwd | awk -F : '{print $6}')
+DIRECTORY=$(getent passwd mythtv | cut -d':' -f6)
 if [ -f "$DIRECTORY/.mythtv/config.xml" ]; then
     su mythtv -c "/usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW >> '/var/log/mythtv/jamu.log'"
 fi

Mythbuntu 9.10 / 0.22.0+fixes22594-0ubuntu1





Follow ups

References