Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I think I goofed... ;)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Vindane
n00b
n00b


Joined: 05 Mar 2005
Posts: 11
Location: Indiana

PostPosted: Sun Mar 27, 2005 12:12 am    Post subject: I think I goofed... ;) Reply with quote

Okay I know I shouldn't have done this but I did. After using portage quite a few times and it always reminding me to update these four config files in /etc, i finally did. Well, like an idiot, i didn't read up on exactly what i was doing so I just winged it.
Well from what i remember i did things like deleted the file "group" and renamed "group-" to "group". Another file was "shadow" that I did that to.
There were two other files that I renamed like this.
Well, now my username and my wife's username can't be recognized by my system. I can log in but it says something like "Can't find userid 1000". The reason that I deleted these files was because to the untrained eye they looked very similar.
So my question is this... Should I just add two more users for my wife and I or can I salvage what I did?

Thanks!!
_________________
Vindane
Back to top
View user's profile Send private message
Beekster
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 268
Location: Sydney

PostPosted: Sun Mar 27, 2005 12:57 am    Post subject: Reply with quote

Add two more users, in the same order you did previously.

Check /etc/passwd that the third parameter for the new users matches your old user id numbers, typically 1000 & 1001 respectively.

If you wiped /etc/shadow, make sure you reset your root passwd. (as well as the new users...)

Revisit /etc/groups to see that your and your wife's usernames are in the correct groups.
Back to top
View user's profile Send private message
Vindane
n00b
n00b


Joined: 05 Mar 2005
Posts: 11
Location: Indiana

PostPosted: Sun Mar 27, 2005 6:16 pm    Post subject: Reply with quote

Code:
bash-2.05b# useradd -m -G users,wheel,floppy,cdrom,games,usb,video,audio -s /bin/bash vindane
useradd: unknown gid 100
useradd: unknown group users
useradd: unknown group wheel
useradd: unknown group floppy
useradd: unknown group cdrom
useradd: unknown group games
useradd: unknown group usb
useradd: unknown group video
useradd: unknown group audio


Any ideas?
_________________
Vindane
Back to top
View user's profile Send private message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Sun Mar 27, 2005 8:25 pm    Post subject: Reply with quote

Try adding the user only with:
# useradd /bin/bash NAME

Then manually edit /etc/group file.

Don' know if it makes any difference, but...

Would be easier to restore the messed up files from backup...:twisted:

:D
Back to top
View user's profile Send private message
Vindane
n00b
n00b


Joined: 05 Mar 2005
Posts: 11
Location: Indiana

PostPosted: Sun Mar 27, 2005 9:05 pm    Post subject: Reply with quote

Nope that didn't work either.

Code:
bash-2.05b# useradd /bin/bash vindane
useradd: unknown gid 100
Usage: useradd [-u uid [-o]] [-g group] [-G group,...]
               [-d home] [-s shell] [-c comment] [-m [-k template]]
               [-f inactive] [-e expire]
       useradd -D [-g group] [-b base] [-s shell]
               [-f inactive] [-e expire]

_________________
Vindane
Back to top
View user's profile Send private message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Sun Mar 27, 2005 9:27 pm    Post subject: Reply with quote

Check what gid does users group has in /etc/group and pass this number to userdadd -g GID.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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