View previous topic :: View next topic |
Author |
Message |
Vindane n00b
Joined: 05 Mar 2005 Posts: 11 Location: Indiana
|
Posted: Sun Mar 27, 2005 12:12 am Post subject: I think I goofed... ;) |
|
|
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 |
|
|
Beekster Apprentice
Joined: 26 Nov 2002 Posts: 268 Location: Sydney
|
Posted: Sun Mar 27, 2005 12:57 am Post subject: |
|
|
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 |
|
|
Vindane n00b
Joined: 05 Mar 2005 Posts: 11 Location: Indiana
|
Posted: Sun Mar 27, 2005 6:16 pm Post subject: |
|
|
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 |
|
|
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Sun Mar 27, 2005 8:25 pm Post subject: |
|
|
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...
|
|
Back to top |
|
|
Vindane n00b
Joined: 05 Mar 2005 Posts: 11 Location: Indiana
|
Posted: Sun Mar 27, 2005 9:05 pm Post subject: |
|
|
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 |
|
|
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Sun Mar 27, 2005 9:27 pm Post subject: |
|
|
Check what gid does users group has in /etc/group and pass this number to userdadd -g GID. |
|
Back to top |
|
|
|