2

A while ago I was messing around with my elementary OS setup and ended up crashing my main admin account. I'm not sure exactly what I did but essentially every time I would try to login, I would get stuck in a login loop. It would halfway log in and then crash and shoot me back to the login screen.
I stopped using elementary OS for a while because of this and went back to my main OS ubuntuMATE.
Today I realized well, one: I really like the look and feel of elementary OS and two: that I could just create a new account through terminal and add it to the sudo group, successfully creating a new admin account.
It's great I can do everything I need from this account except edit any of the files found in my elementary OS file system as they are all belonging to my main admin account.
How can I go about transferring ownership of all these files to the new admin account and/or delete the old admin account? Would in deleting the former admin account automatically transfer said files? How do I solve this? Thank you for the help in advance.

ZeDD

  • very simple sudo adduser fopedals sudo – Fofaster Nov 25 '15 at 6:46
  • silly me, useless question I have asked, :) – Ravan Nov 25 '15 at 6:48
  • Do you have any idea how I should go about fixing this? – Fofaster Nov 25 '15 at 6:54
  • Add new admin account to old admin group, – Ravan Nov 25 '15 at 6:54
  • I'm not sure I know how to do that. – Fofaster Nov 25 '15 at 7:04
1

Here the goal is to allow new admin to access files whose permissions and ownership are under old admin.

In such cases you can do following:

  • change the file ownership or

    chown user:group filename 
    
  • Add new admin to group old admin

0

You can do this quite quick with some commands. First you need the uid of your "old admin" and "new admin" account:

$ id -u old-admin

$ id -u new-admin

Let's say "old uid" is 1000 and "new uid" is 2000, the command

$ find /home -uid 1000 -exec chown 2000 {} \; (probably you will need sudo)

will change the ownership of all files owned by "old-admin" recursively in /home to "new-admin".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.