can not open timekpr gui

Asked by Gérard B4

I loaded timekpr on 2 PC under Ubuntu Lucid.
On the first, it works fine.
On the second, I can not open the gui. When trying it in terminal ( sudo timekpr-gui ) I get following error:
/usr/share/python-support/timekpr/timekpr-gui.py:97: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.wTree = gtk.glade.XML(gladefile, 'mainwindow', APP_NAME)
Traceback (most recent call last):
  File "/usr/share/python-support/timekpr/timekpr-gui.py", line 587, in <module>
    timekprGUI()
  File "/usr/share/python-support/timekpr/timekpr-gui.py", line 151, in __init__
    if isnormal(userinfo[0]):
  File "/usr/share/python-support/timekpr/timekpr-gui.py", line 73, in isnormal
    userid = int(getpwnam(username)[2])
KeyError: 'getpwnam(): name not found: dhcp'

One odd difference I see between the 2 machines, is that although they have the same user list (1 admin=me and 5 other simple users), the Ubuntu login menu lists the users in a different order on the 2 machines.
On the 1st machine (timekpr works ok), the default user displayed is a standard user.
On the second, the default user is me.
Another difference is the screen display size. 2nd machine has a smaller screen (1024*7868).

Any idea how to get timekpr working on 2nd machine?

Question information

Language:
English Edit question
Status:
Answered
For:
timekpr Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Savvas Radevic (medigeek) said :
#1

Can you give the output of this command:

cat /etc/passwd | cut -d : -f 1-3

P.S. The development of this project is practically dead. Please prefer Gnome nanny or some other software, e.g. Mkahawa Internet Cafe management software: https://www.unwiretechnologies.net/downloads.php

Revision history for this message
Gérard B4 (n-launchpad1-gb4-spamgourmet-com) said :
#2

Here it is:

gb4@dell530n:~$ cat /etc/passwd | cut -d : -f 1-3
root:x:0
daemon:x:1
bin:x:2
sys:x:3
sync:x:4
games:x:5
man:x:6
lp:x:7
mail:x:8
news:x:9
uucp:x:10
proxy:x:13
www-data:x:33
backup:x:34
list:x:38
irc:x:39
gnats:x:41
nobody:x:65534
libuuid:x:100
syslog:x:101
messagebus:x:102
avahi-autoipd:x:103
avahi:x:104
couchdb:x:105
speech-dispatcher:x:106
usbmux:x:107
haldaemon:x:108
kernoops:x:109
pulse:x:110
rtkit:x:111
saned:x:112
hplip:x:113
gdm:x:114
gb4:x:1000
laure:x:1001
antoine:x:1002
maxime:x:1003
claire:x:1004
invite:x:1005
statd:x:115

Note: admin is gb4 (me)
By the way, I have de-installed timekpr of this machine but I guess it does not affect passwd file.
For what concerne Nanny: I already tried it, but it did not limit the time at all (see https://bugzilla.gnome.org/show_bug.cgi?id=644323 ).
What'the relation ship between Mkahawa Internet Cafe and parental control???

Revision history for this message
Savvas Radevic (medigeek) said :
#3

Can you also give the output of this command:
sudo cat /etc/shadow | cut -d: -f1

The error seems to say that there is a user called "dhcp", we'll see if this assumption is true.

> What'the relation ship between Mkahawa Internet Cafe and parental control???
Well none, but timekpr was used as parental control and as a time limitation software (similar to how internet cafes work). So I gave you the choice, if you're interested in parental control software, gnome nanny is the way to go. :)

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

Revision history for this message
Gérard B4 (n-launchpad1-gb4-spamgourmet-com) said :
#5

Here is teh output of the required command:

gb4@dell530n:~$ sudo cat /etc/shadow | cut -d: -f1
[sudo] password for gb4:
root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy
www-data
backup
list
irc
gnats
nobody
libuuid
dhcp
syslog
klog
hplip
avahi-autoipd
gdm
pulse
messagebus
avahi
polkituser
haldaemon
gb4
laure
antoine
maxime
claire
Debian-exim
invite
usbmux
couchdb
speech-dispatcher
kernoops
rtkit
saned
landscape
statd
freeswitch
mysql
tomcat6
red5
postgres
gb4@dell530n:~$

It does show an 'user' dhcp. I don't know where it comes from. May be a fossil from a previous installation of a BigBlueButton server (the most complicated networking stuff I tried on this PC, but which I uninstalled since that time: I had too many problem with it).
I also have no idea if this dhcp user is still used by anything or not. How can I know?

Revision history for this message
Savvas Radevic (medigeek) said :
#6

No idea. :) All I know is that if you remove it you will fix the problem.

Revision history for this message
Savvas Radevic (medigeek) said :
#7

For example, in my case, I have identical users in /etc/passwd and /etc/shadow files

Revision history for this message
Savvas Radevic (medigeek) said :
#8

Actually in your case, you have a lot of differences between /etc/passwd and /etc/shadow:

$ diff -ur test_passwd.txt test_shadow.txt
--- test_passwd.txt 2011-10-04 22:56:29.000000000 +0200
+++ test_shadow.txt 2011-10-04 22:56:52.000000000 +0200
@@ -17,24 +17,34 @@
 gnats
 nobody
 libuuid
+dhcp
 syslog
-messagebus
+klog
+hplip
 avahi-autoipd
+gdm
+pulse
+messagebus
 avahi
-couchdb
-speech-dispatcher
-usbmux
+polkituser
 haldaemon
-kernoops
-pulse
-rtkit
-saned
-hplip
-gdm
 gb4
 laure
 antoine
 maxime
 claire
+Debian-exim
 invite
+usbmux
+couchdb
+speech-dispatcher
+kernoops
+rtkit
+saned
+landscape
 statd
+freeswitch
+mysql
+tomcat6
+red5
+postgres

"-" means: exists only in passwd
"+" means: exists only in shadow

I don't know what you should do, but you have a lot of differences between passwd and shadow. I don't know if users can exist only in shadow and not in passwd (and vice versa). :)

Revision history for this message
Savvas Radevic (medigeek) said :
#9

> "-" means: exists only in passwd
> "+" means: exists only in shadow

I made a mistake, I did not sort the entries. I think the only problem is dhcp in shadow.
(I'm really sorry for multi-commenting!)

Revision history for this message
Savvas Radevic (medigeek) said :
#10

Problematic user entries in shadow (exist only in shadow file):

Debian-exim
dhcp
freeswitch
klog
landscape
mysql
polkituser
postgres
red5
tomcat6

Can you help with this problem?

Provide an answer of your own, or ask Gérard B4 for more information if necessary.

To post a message you must log in.