GNOME Bugzilla – Bug 149204
'Unknown' username in scoreboards
Last modified: 2005-06-09 00:29:52 UTC
Description of Problem: Whenever I have a top ten score for ANY gnome game, the user of the new score is determined to be 'Unknown'. This problem has always been there, so all the high-score tables contain only 'Unknown' users. This problem is the same for each user on my machine. The .scores files are writeable, there's no problem there. Also, the .scores files are loaded correctly by each game. Steps to reproduce the problem: 1. Break a score ;-) Seriously though, I wouldn't know how anyone else can reproduce this. Actual Results: User is written to highscore table as 'Unknown'. Other values, such as the score itself and the date, are correct. Expected Results: Username is used when writing to highscores. How often does this happen? Always, for every user. Additional Information: gnome version: 2.6 gnome-games version: 2.6.0.1 uname -a: Linux localhost 2.6.5-gentoo #1 Sat Apr 10 12:27:34 CEST 2004 i686 AMD Athlon(tm) Processor AuthenticAMD GNU/Linux distribution: Gentoo (mostly up-to-date)
This sounds like a problem resolving user names. Could you attach a copy of a high scores file ? This should tell me if the problem occurs when writing the file or when reading it. i.e. whether garbage is being written to the file or valid data is being misinterpreted. Also, have you done anything unusual with pam or any of the other stuff that affects ? Could you attach a copy of /etc/nsswitch.conf ? (This will tell me how username lookups are being done.) I should also say that this will technically be a libgnome bug, but since that code is going to be moved into gnome-games in 2.9 it had better be my bug :).
I have this problem too. I always assumed it was a feature so that your boss couldn't tell who was wasting all their time playing tetris :) Looking into it.
OK. For me, this problem is caused by the fact that I have no fullname set in my password file. Once I set one it started working. Maybe the games should fall back on using your login name if no fullname is available? I'm actually of the mind that they should just always use your login name (as fullname can be spoofed). Although... why you'd want to spoof highscores for other people is sort of an odd question.....
It looks like libgnome was built to do exactly what you suggest: ### gnome-score.c ### realname = g_strdup (g_get_real_name ()); if (strlen (realname) == 0) realname = g_strdup (g_get_user_name ()); ### ------------- ### However, these days ( as noted in Bug #143552 ) , g_get_real_name returns "Unknown" when the real name can not be found. It looks like the snippet above stopped working with glib after Jan. 1999.... :) As far as spoofing, any administrator concerned about that would simply remove chfn.
I've filed a patch against libgnome to fix this. With luck it will go in soon. See bug #149270 and try it out. As far as spoofing goes, the worst that can happen is that you get framed for your coworkers game use.
Ya... I was sort of kidding about that whole spoofing thing :)
*** Bug 151181 has been marked as a duplicate of this bug. ***
Bug 149270 has been resolved (in CVS libgnome), so this one is too.
*** Bug 306922 has been marked as a duplicate of this bug. ***