Permissions problems are being a huge PIMA

Reinhold Rumberger rrumberger at web.de
Tue Feb 1 06:34:59 UTC 2011


Am Dienstag 01 Februar 2011, um 00:21:00 schrieb gene heskett:
> On Monday, January 31, 2011 05:54:33 pm Tom H did opine:

<snippage>

> > 
> > You can boot into single user mode and do either of the following:
> > 
> > 1. Delete the user created at install, modify "/etc/login.defs", and
> > re-create the user. (Only useful at first boot!)
> 
> That was 6 months and a lot of carved steel before. :)
> 
> > 2. Modify the uid of the user,  modify "/etc/login.defs", and chown
> > the user's home directory recursively with the new uid.
> 
> In this order?  I am currently ssh -Y'd into that box and I'd hate doing
> half of it and being locked out.  So, I first modified /etc/adduser.conf,
> then /etc/group, finally /etc/passwd (all as sudo -i), then cd'd to /home
> and did the chown -R gene:gene gene bit.  A couple of ls -l's seem to
> indicate it all worked.  Backed out of the sudo with a ctrl-d. But emc
> wouldn't run, something about a BadWindow error. Sudo reboot, & close the
> link.  Waited for a ping to work then it took 3 passes before it bought my
> password again, but I'm back in with an "ssh -Y shop" as gene on this box.

Not sure whether you just forgot to mention it, but you really should change 
/etc/login.defs, too. Otherwise gene will be considered a system user and, 
worse, should you ever create another user, they'll be back to having UID 
1000.

> But, emc still has a tummy ache over X and exits.  Humm, that box was
> sitting at a local login prompt when I started, and is sitting there again
> as I doubt my ssh login starts the x server.
> 
> Does that fit with this error exit on emc's part?
> 
> gene at shop:~$ cd emc2
> gene at shop:~/emc2$ emc -l
> EMC2 - 2.4.6
> Machine configuration directory is '/home/gene/emc2/configs/genes-mill'
> Machine configuration file is 'genes-mill.ini'
> Starting EMC2...
> X Error of failed request:  BadWindow (invalid Window parameter)
>   Major opcode of failed request:  3 (X_GetWindowAttributes)
>   Resource id in failed request:  0xffffffff
>   Serial number of failed request:  749
>   Current serial number in output stream:  750
> Shutting down and cleaning up EMC2...
> Cleanup done
> EMC terminated with an error.  You can find more information in the log:
>     /home/gene/emc_debug.txt
> and
>     /home/gene/emc_print.txt
> as well as in the output of the shell command 'dmesg' and in the terminal
> 
> Or have I royally screwed the moose here?

Something Tom (and me, too, before) forgot are tmp directories. Try the 
following command and see whether that helps:
sudo chown -R gene.gene {,/var}/tmp/*gene*

The background being that both X and some other programs like to keep 
temporary files and would probably like permission to actually do so... :-P

Whether this will help depends on whether your /tmp is cleaned on every boot, 
but it definitely shouldn't hurt.

You may also want to remove all the different *auth* files in your home 
directories to re-initialise the different authentication cookies.

Also, running another "chmod -R gene.gene ~gene/" after the reboot probably 
won't hurt as some program may still have been running with the old 
credentials and might have saved some config using them.

  --Reinhold




More information about the kubuntu-users mailing list