Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Moving files from one user to another

  1. #1
    Join Date
    Oct 2011
    Beans
    5

    Smile Moving files from one user to another

    Well, I've been searching for a while on how to move my files from my original admin account to my new admin account (and then I would delete the older one, as I was fooling around with it's appearence, and before I knew it Unity was gone... and I've been unable to do pretty much anything in it. Except, there was still a bar at the top after I restarted my netbook and I've able to use the normal settings and see its files.). The best information I found was here: http://ubuntuforums.org/showthread.php?t=514493

    So I tried the following code in terminal:

    HTML Code:
    sudo mv /home/lewnna home/swaly
    And then it asked for my password, and I entered it, and after that I got:

    HTML Code:
    mv: cannot move `/home/lewnna' to `home/swaly': No such file or directory
    I tried a whole bunch of other ways to write in the user files, as I'm not a pro with computers, so I just basically tried anything. And the only other result I could get from terminal was:

    HTML Code:
    mv: cannot stat `/home/lewnna': No such file or directory
    Is there something I'm doing wrong? All I want to do is move my stuff from lewnna to swaly. If there are any other ways of doing so, please let me know. Any help would really be appreciated.

    And I am using Ubuntu 11.10, if that's important to know....

    EDIT:

    I also tried:

    HTML Code:
    sudo cp -r /home/lewnna/ /home/swaly/
    Didn't work.

    I also understand that using the following code should've helped:

    HTML Code:
    gksu nautilus
    But it didn't. I tried looking through the root folder but it always took me back to the home folder and all I could get was the desktop.
    Last edited by Swaly; October 21st, 2011 at 09:47 PM. Reason: more information

  2. #2
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Moving files from one user to another

    Quote Originally Posted by Swaly View Post
    I also tried:

    HTML Code:
    sudo cp -r /home/lewnna/ /home/swaly/
    Didn't work.
    Try:
    Code:
    sudo cp -r /home/lewnna/* /home/swaly/
    The difference is that you want to copy everything within those folders, rather than the folders themselves.

    You'll also have to make sure the permissions are set for the right user. So after moving all the files over take ownership of them by:
    Code:
    sudo chown -R swaly:swaly /home/swaly
    Last edited by Paqman; October 21st, 2011 at 10:19 PM.

  3. #3
    Join Date
    Apr 2006
    Beans
    52
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Moving files from one user to another

    @ Swaly

    I don't think you are writing the code correctly. You missed out one of the /

    Should be
    Code:
    sudo mv /home/lewnna /home/swaly
    which would copy the directory. Correction it would move the directory
    or

    Code:
    sudo mv /home/lewnna/* home/swaly/
    which would just copy the files. Correction, it would move the files

    Don't forget about changing ownership

    I should mention that I am noob and only 7 days into Ubuntu so wait for someone else to confirm that I am understanding the code correctly as I don't wish to create problem with your OS
    Last edited by cozumel; October 21st, 2011 at 10:11 PM.

  4. #4
    Join Date
    Apr 2006
    Beans
    52
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Moving files from one user to another

    Posted the same time as paqman lol.

    Don't know if it is important. But if you do choose the copy option I think that it merely copies all the files without placing them in correct locations or sub-folders. Again, I could be wrong.

  5. #5
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Moving files from one user to another

    Quote Originally Posted by cozumel View Post
    But if you do choose the copy option I think that it merely copies all the files without placing them in correct locations or sub-folders.
    No it'll copy them in exactly the same structure as they were in the original.

  6. #6
    Join Date
    Apr 2009
    Location
    Midwest, U.S.A.
    Beans
    1,209
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Moving files from one user to another

    One of the mistakes I made as a new Linux user was trying to copy MY files to another user, which requires 'root' privileges. In doing so, the files have 'root' ownership and group.

    Instead it is much easier (and better IMO) to copy files from another user to your own home directory. So, login as the other user, and given that you have 'read' permissions, copy the file, and it will be owned by the user that needs the file.

    Good Luck!
    Last edited by AlphaLexman; October 21st, 2011 at 10:31 PM.
    Laptop: Dell Inspiron 8200 - Fedora 13 - Goddard
    Desktop: Self-Built - [Ku, Lu, Xu, U]buntu - Lucid 10.04.3 (LTS)
    Linux User: 498249 / Ubuntu User: 29241

  7. #7
    Join Date
    Oct 2011
    Beans
    5

    Re: Moving files from one user to another

    I tried all of the codes... they didn't work. But I'm beginning to think that this isn't a code problem, but rather the account.

    I restarted my computer and tried logging into lewnna again, with gnome classic, hoping it would work because I thought unity was the problem. But I wasn't able to log in... I just went to a black space and right back to the login screen. And I tried going into gnome, and just ubuntu, but the same thing happened.

    I didn't delete the account but it seems like it disappeared even though lewnna's still listed under the users....

  8. #8
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Moving files from one user to another

    Quote Originally Posted by AlphaLexman View Post
    Instead it is much easier (and better IMO) to copy files from another user to your own home directory. So, login as the other user, and given that you have 'read' permissions, copy the file, and it will be owned by the user that needs the file.
    Yep, that would work, and you're right it would be easier. The only thing that might trip you up is that it would copy absolutely everything. Other users have no read access to your Private folder, for example.

  9. #9
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Moving files from one user to another

    Quote Originally Posted by Swaly View Post
    I tried all of the codes... they didn't work. But I'm beginning to think that this isn't a code problem, but rather the account.
    Possibly, have you got the home folders encrypted? See if you can navigate to another user's home folder, if you can't view their files then it's probably encrypted.

    If that's the case the easiest thing to do is probably copy the files to an external source (USB stick?) then copy them back from the other account.

    I didn't delete the account but it seems like it disappeared even though lewnna's still listed under the users....
    Sounds like lewnna's home folder isn't there any more. One of your mv commands probably b0rked it. The account is still on the system, it just doesn't have all the required config files that live in /home.

  10. #10
    Join Date
    Oct 2011
    Beans
    5

    Re: Moving files from one user to another

    Quote Originally Posted by Paqman View Post
    Possibly, have you got the home folders encrypted? See if you can navigate to another user's home folder, if you can't view their files then it's probably encrypted.

    If that's the case the easiest thing to do is probably copy the files to an external source (USB stick?) then copy them back from the other account.
    It's encrypted, then. If it were possible to access lewnna, I think I'd just use my verbatim, then.

    Quote Originally Posted by Paqman View Post
    Sounds like lewnna's home folder isn't there any more. One of your mv commands probably b0rked it. The account is still on the system, it just doesn't have all the required config files that live in /home.
    Well... I really have no clue what to do then. I guess it's back to googling for me.

Page 1 of 2 12 LastLast

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
  •