My shop box has no users!
rrumberger at web.de
Thu Feb 3 21:46:08 UTC 2011
On Donnerstag 03 Februar 2011, 21:53:07, gene heskett wrote:
> On Thursday, February 03, 2011 03:17:17 pm Reinhold Rumberger did opine:
> > On Donnerstag 03 Februar 2011, 19:29:17, gene heskett wrote:
> > > Greetings;
> > >
> > > I tried to synchronize my usernum between this machine, and the shop
> > > machine, which amanda also backs up. By modifying everything in /etc
> > > to renumber the user gene from 1000 to 500 like it is here on this
> > > pclos box. That did not gain me write perms in /home/gene on the shop
> > > box, so I reverted everything.
> > >
> > > I can ssh into this machine as 'gene', using my usual passwd, but the
> > > prompt is:
> > > root at shop:/var# logout <-i did a ctrl+d
> > > I have no name!@shop:~$ whoami
> > > whoami: cannot find name for user ID 1000
> > >
> > > Yet I exist in both the original /etc/passwd, /etc/group as 1000:1000
> > I've never used amanda (to complex for my little laptop), so I'm
> > clueless about that, but could you check the permissions on these:
> > -rw-r--r-- 1 root root 1002 2011-01-20 12:21 /etc/group
> > -rw-r--r-- 1 root root 2,0K 2010-12-10 00:14 /etc/passwd
> > I just reproduced the above problem by removing read permissions.
> A tip of this old farts blaze orange winter hunting cap to Reinhold, I
> believe that was it as I found all the files that I had reverted by doing
> the mv file- to file, to have no read perms for other than root.
> Thank you very much. However, in order to fix my ssh login, I logged out
> and back in so I am now presented with a 'gene at shop' prompt. But now I've
> lost my entry in sudoers, damn. That I assume is a reboot to level 1 fix
Well, you can also try the init=/bin/bash thing.
It would kind of defeat the purpose of using sudo only if you could fix this
without pyhsical access to the machine.
Unless you set the root password...
> The sudoers file looks like this now:
> # User privilege specification
> root ALL=(ALL) ALL
> # Allow members of group sudo to execute any command after they have
> # provided their password
> # (Note that later entries override this, so you might need to move
> # it further down)
> %sudo ALL=(ALL) ALL
> #includedir /etc/sudoers.d
> # Members of the admin group may gain root privileges
> %admin ALL=(ALL) ALL
> IIRC that % sign means its a comment too?
Nope. Means it's a group, not a user.
> I just waded through the snow and tried to get to the boot menu about 7 or
> 8 times, but it cannot be done with all the speedboot fixings.
So holding shift doesn't work? I would suggest using "grub-reboot <entry>",
but that would need root permissions...
> So, how do we get a rescue mode with this now, or am I resigned to taking a
> cd out there & seeing if I can recall how to edit the perms on the sudoers
> file, which are 444 now and should be 440, so it will not use it, locking
> me out. I guess thats the next step anyway, back later.
Depending on which live cd, mounting could be problematic (I prefer Knoppix
which makes this easy). Apart from that it is as simple as doing a
"sudo chmod o-g <mountpoint>/etc/sudoers" on the live system, so that
shouldn't be a problem.
Sorry, but I don't know any other way.
More information about the kubuntu-users