Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What to do if you manage to delete your user accounts!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
RageAgainstTheMachine
n00b
n00b


Joined: 30 Sep 2004
Posts: 14
Location: Frogstar world A

PostPosted: Thu Sep 30, 2004 1:49 am    Post subject: What to do if you manage to delete your user accounts! Reply with quote

I recently set my /etc/make.conf with the addition of
Code:
ACCEPT_KEYWORDS="~x86"

And after doing a partial
Code:
emerge --update --deep world

i ran
Code:
etc-update
and realised that after I'd done it i manage to overwrite some pretty important files (I am still not a linux guru, only used it for 2 weeks so far) but i did have backups of my xorg.cfg and fstab files (not that they were the worry or the hard ones to re-do.

but having overwritten my users file, i was left with a useless computer, i couldnt log in through new consols, (the root password changed to something, i dont know what) and my main user account dissapeared.

So here are the steps i did to recover my system back to normal:
I was in KDE, (running emerge in terminal 1(?))

ALT+CTRL+F1 to switch to the terminal (i was already logged in to do the emerge, lucky)

first i changed the root password:
Code:
passwd


then found the id of my now deleted username by doing:
Code:
ls -l


now i know my user ID i can re add my username:
Code:
useradd username -d /home/username -G users,wheel,audio,tty -s /bin/bash -u xxx (the user id i found from ls -l)


then change the password back to what it was for that user

now that i had the accounts setup i restored the backups from my config files and resetup the network config and other miscelaneous stuff, but maybe this little experience might help someone who did something as silly as i did


____
just a little about my system
Dell Inspiron 5100
P4 2.66
512MB RAM
32MB Mobility Radion 7200 (i think)
40GB HDD (root&boot = reiserfs)

and about me
i recently changed from a full windows system to a full linux system, and i havent regretted it for a second, im using gentoo-dev-2.6.8 (from a stage one install) and everything has been working sweetly, a few glitches and stuff-ups but nothing i havent been able to work out or fix! my best friends in this process have been google, the freenode irc gentoo channel and reading thru these forums :D

Luke
_________________
RageAgainstTheMachine
--
What is the ultimate answer to Life, The Universe and Everything? 42
KDE is kool!
--
Gentoo on a Dell inspiron 5100
P4 2.66
512MB RAM
40GIG HDD + 200GIG External 7200 8MB HDD
Back to top
View user's profile Send private message
nero
n00b
n00b


Joined: 08 Aug 2002
Posts: 66

PostPosted: Thu Sep 30, 2004 2:04 am    Post subject: Reply with quote

Man... I hate it when that happens... :wink:
Back to top
View user's profile Send private message
oberyno
Guru
Guru


Joined: 15 Feb 2004
Posts: 467
Location: /bin/zsh

PostPosted: Thu Sep 30, 2004 2:32 am    Post subject: Reply with quote

Code:
oberyno % cd /etc                                                             ~
oberyno % co config-archive/etc/group,v                                   /etc
I'm using dispatch-conf instead of etc-update, so it's not particularly difficult to rollback changes.
Back to top
View user's profile Send private message
RageAgainstTheMachine
n00b
n00b


Joined: 30 Sep 2004
Posts: 14
Location: Frogstar world A

PostPosted: Thu Sep 30, 2004 3:26 am    Post subject: Reply with quote

oberyno wrote:
Code:
oberyno % cd /etc                                                             ~
oberyno % co config-archive/etc/group,v                                   /etc
I'm using dispatch-conf instead of etc-update, so it's not particularly difficult to rollback changes.


That sounds good, i didnt even know about dipatch-conf....
well thanks for that, i will use that from now on :)

Luke
_________________
RageAgainstTheMachine
--
What is the ultimate answer to Life, The Universe and Everything? 42
KDE is kool!
--
Gentoo on a Dell inspiron 5100
P4 2.66
512MB RAM
40GIG HDD + 200GIG External 7200 8MB HDD
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum