Easylife utility confounded by legacy UID 500 in FC16

With Fedora Core 16 UIDs (and GIDs) now start at 1000 instead of 500 as was the case previously.

However, if a system has been upgraded from a previous version of Fedora, existing UIDs and GIDs are preserved. I recently found that this creates an ambiguous situation for the easylife utility.

Easylife is a utility that allows Fedora users to configure their systems by helping to install things like fonts, drivers, codecs and the like.

When the easylife program is invoked as a regular user the consolehelper program is in turn invoked which requests the root password. When I did this after supplying the root password, the program would terminate with a window that popped up and displayed the following error message

NO regular user found! It's a dangerous mistake to use your system as root. Most programs don't expect to be run with root privileges. Create a regular user and login again. Then you should run this program again.

It turns out that easylife is making a check on the UID and rejecting it if the UID is not greater than 999. If my system had been a fresh install of FC16 this would have been fine. However, since I had upgraded to FC16  from FC14, my previous UID of 500 was preserved and the check is now no longer valid. First, to test this hypothesis I created a test user with UID and GID of 1001. This allowed the easylife program to run.

Finally, I simply went to /usr/share/easylife/lib/common and edited the file whichuser.sh.  Changing the code

while IFS=':' read user pass uid gid gecos home shell; do
   if [[ "$uid" -gt 999 && "$uid" -lt 65534 ]]; then
        USERS[$COUNT]="FALSE $user"
HOMES[$COUNT]="$home"
let COUNT++
   fi

so that the 999 is changed to 499 (i.e. permit UIDs of 500 and above) allowed the easylife program to run without problems. In other words, life is easy again!

Post a Comment

Popular posts from this blog

Hit failing alternator with a hammer to confirm diagnosis of failing alternator due to bad brushes

alternatives --install gets stuck: failed to read link: No such file or directory

Fedora 23 Calendar PopDown in DarkGlass Gnome Shell Theme is cut off