LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-29-2005, 06:48 AM   #1
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Rep: Reputation: 30
Where is all the information about users and groups stored?


I lost all my users and groups as a result of uninstalling a single package (quasar). So now I cannot login because the system does not accept any user name and password. I have created a topic on Ubuntu forum and here in software, but still no luck.

Can anyone tell me where all the info on users and groups is stored. I wonder if I have lost all those files can I replace them with manually created one? Or with some standard files from another machine or installation?
 
Old 06-29-2005, 06:57 AM   #2
codec
Member
 
Registered: Sep 2003
Location: mad.es.eu
Distribution: ubuntu 5.04 knoppix Slack91/10 freebsd51 vector4 redhat9
Posts: 304

Rep: Reputation: 30
if the same case happen in slackware, I would:

-boot in with slackware cd2
-chroot to the hd
-adduser bla
and/or modify /etc/shadow

(he group file in in /etc/group but I don't you would need to touch it)

if it doesn't work, you can just mount the hdd and copy the data out.
 
Old 06-29-2005, 07:14 AM   #3
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by codec
if the same case happen in slackware, I would:

-boot in with slackware cd2
-chroot to the hd
-adduser bla
and/or modify /etc/shadow

(he group file in in /etc/group but I don't you would need to touch it)

if it doesn't work, you can just mount the hdd and copy the data out.
Thanks for the advice. Still have to learn a lot of things: never used chroot before. Can I boot from Ubuntu live cd (or any other recovery cd, because Ubuntu has only one installation cd and another live) and used chroot from there? how should I use it? Is it something like:

chroot /mnt if I mount root partition on /mnt?
 
Old 06-29-2005, 06:36 PM   #4
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
Well I have done the following:

1. Installed Ubuntu on my second HD
2. Set up users as they were on my main installation
3. Copied the following files from a new /etc to an old /etc:
group
gshadow
passwd
shadow
sudoers
4. Edited menu.lst to add option to boot my old installation

And pretty much that's it. I had to change ownership of users homes, because they were messed up.

Now it works. Hopefully it will be fine.

The only question left is how to point grub to my old menu.list again, because it now uses menu.list from a second HD?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is Audio Information Stored superdude_876 Linux - Hardware 2 11-19-2005 11:20 AM
groups and users twb2005 Linux - Newbie 7 10-10-2005 06:21 PM
users and groups twb2005 Red Hat 1 10-10-2005 01:47 PM
users and groups Red Squirrel Linux - Newbie 2 02-22-2004 07:37 PM
users and groups krfulton Linux - Security 1 01-05-2004 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration