Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Somehow Deleted All Accounts

  1. #11
    Join Date
    Feb 2011
    Beans
    22

    Re: Somehow Deleted All Accounts

    I chose failsafex and it said:
    Continuing will remount your / filesystem in readwrite mode and mount any other filesystem defined in /etc/fsta6.
    <Yes> <No>
    I selected yes and a terminal displayed
    fsck from util-linux 2.20.1
    /dev/sda6: clean, 459150/7536640 files, 5744013/30129408 blocks
    Then it just shows a blinking "_" shaped cursor on the line below it.
    Nothing else happens.

  2. #12
    Join Date
    Jan 2011
    Beans
    193

    Re: Somehow Deleted All Accounts

    This is diasappointing, I never used to do this, it is new to me also. But after the check it should continue somehow.
    Just a blinking cursor is not good.
    If nothing else will heppen in a little time, just reboot and try the same again.
    You should/must end up with a grafical environment.

  3. #13
    Join Date
    Feb 2011
    Beans
    22

    Re: Somehow Deleted All Accounts

    I tried it several times, but it still did the same thing. I tried the root option and was able to view my old account's home directory. All that was in was a file called Access-Your-Private-Data.desktop and a README.txt file. Does that mean all my files have been erased?

  4. #14
    Join Date
    Feb 2011
    Beans
    22

    Re: Somehow Deleted All Accounts

    If there's no way to recover my account files, I'd be happy with just setting up a new administrator account. I had made a flashdrive backup a few months back and it's only slightly outdated. A lot of my programming projects have the source files uploaded on my college's website. The only thing I think I would lose is about 3 gigs of family photos which I think my sister has a copy on her computer.

  5. #15
    Join Date
    Jan 2011
    Beans
    193

    Re: Somehow Deleted All Accounts

    I am afraid you accidently erased all use user id's and their contend.
    So that is bad luck as it can be.

    But... You don't need to reinstall ubuntu now.

    Just add a line to the end of the /etc/passwd and the /etc/shadow.
    Add the userid at the end of the line in the /etc/group file and you might be able to log in again to the grafical env you like.
    And start over again, an create all the users you had before.

    To /etc/passwd :
    user1:x:1001:1001:User1,,,,:/home/user1:/bin/bash

    to /etc/shadow :
    user1:*:15752:0:99999:7:::

    add user1 after adm in the /etc/group.
    adm:x:4:user,user,user.....,user1

    create a passwd for the user

    passwd user1
    set and repeat the passwd

    Create a /home for that user

    mkdir /home/user1
    chown user1 /home/user1

    I hope not forgot something, but you may be able to log in with user1

    Thos silly smilies does not belog there... fixed.

    Extra update, to become administrator, I thought it is adm in the group file, but it is not.
    Have to search for it, or maby someone else can tell , that could help a lot.


    Ureka, found it already, it is the admin entry not the adm entry ( sorry )
    Last edited by kuifje09; March 10th, 2013 at 10:33 PM.

  6. #16
    Join Date
    Apr 2012
    Beans
    6,561

    Re: Somehow Deleted All Accounts

    Seeing access-Your-Private-Data.desktop probably just means you had an encrypted home directory, which will make recovery a bit more complicated IF the data didn't get deleted with the account

    I would suggest you create a new user account with administrator priviledges then you can log in to a graphical environment with that which will make the recovery easier for you.

    I'm a bit lost with what's going on in this thread but basically once you are in the recovery mode and have dropped to a root shell you can do the following. There is no need to directly edit the /etc/passwd file to do this.

    1. remount the filesystem with write permissions - if you've done an fsck it may already be read-write but this command won't hurt either way:

    Code:
    mount -o remount,rw /
    [note there is NO SPACE between the rw and remount options - just a comma]

    2. create a new user:

    Code:
    adduser newname
    and just follow the on screen prompts

    3. add the user to the sudo group

    Code:
    usermod -aG sudo newuser
    If you plan on keeping the newuser as a regular administrator account you will probably want to add it to all the other typical groups i.e.

    Code:
    usermod -aG adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare newuser
    At that point you should be able to exit the root shell

    Code:
    exit
    and resume normal boot, where you can log in via the GUI as newuser

  7. #17
    Join Date
    Jan 2011
    Beans
    193

    Re: Somehow Deleted All Accounts

    If this : Access-Your-Private-Data.desktop does mean there is an encrypted file system, then the contend is lost I think?

    Not lost ? http://ubuntuforums.org/showthread.php?t=1810825 But then why should I encrypt?

    But it could mean his data is not lost, thanks for jumping in.
    Last edited by kuifje09; March 10th, 2013 at 10:47 PM.

  8. #18
    Join Date
    Jan 2011
    Beans
    193

    Re: Somehow Deleted All Accounts

    When you managed to create a user one way or the other. Then you could enter your old homedir ( cd /home/OLDUSER ) and as suggested in the other post ( link ) try to mount it : Just run ecryptfs-mount-private and enter your log in password. and copy ... read other post .
    But with a little precise work you can also recreate your old user by hand... Not with usermod. ( I would not use usermod for that )

    ( i have to quit for now... )

  9. #19
    Join Date
    Feb 2011
    Beans
    22

    Re: Somehow Deleted All Accounts

    Ok, I made a new administrator account(I tested that sudo works and stuff). I don't think I'll be able to recover those files, but I'll be able to use this new account instead. Thank you everyone for all your help with this. I still don't know how to mark this as solved(someone sent a forum link about it, but it didn't help much), but I think that's it then.

  10. #20
    Join Date
    Jan 2011
    Beans
    193

    Re: Somehow Deleted All Accounts

    Well I wish you good luck recovering your accounts and the encrypted filesystems.
    I found a nice piece of documentation about ecryptfs : ECryptfs
    So if the crypted filesystem is still there, you should find the .Private filesystem.

    I am very curious if you had some luck in recovering.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •