Permissions problems are being a huge PIMA

gene heskett gheskett at wdtv.com
Tue Feb 1 09:08:37 UTC 2011


On Tuesday, February 01, 2011 03:56:29 am Reinhold Rumberger did opine:

> 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*
 
Got that too.

> 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.

Which I should do.  Except an ls -laR|less and 10 minutes scanning a 
loooong list didn't disclose that I had any.
 
> 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.

I'll keep that in mind.
 
>   --Reinhold

Thanks for that heads-up Reinhold, I found a couple more places in /etc 
where I was still user or group 1000 & fixed those too. 
/etc/samba/smbpasswd was one of them.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
<http://tinyurl.com/ddg5bz>
Appendix:
	A portion of a book, for which nobody yet has discovered any use.




More information about the kubuntu-users mailing list