LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-19-2007, 12:08 PM   #1
linexnal
LQ Newbie
 
Registered: Jul 2007
Posts: 29

Rep: Reputation: 15
mv user01 files & preferences to user02-- quick how


I created a new user 'user02' and am going to delete the old one 'user01' because today when I tired to login on the login screen, I couldn't. The screen turned black, after pressing enter, but then after a while it didn't go to the desktop, instead it went back to the login screen. Good thing root still worked so I made user02.

Are there a few simple steps to move user01 files & preferences to user02? I can't find anything through google mainly b/c there aren't any key words or phrases.

few simple steps... im new.. that means I don't know enough so don't assume I do
 
Old 07-19-2007, 12:13 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
'cp -a /home/user01 /home/user02' should do. If the problem is a configuration error, that will just recreate it, though, and if it was a system-wide configuration error, you're likely to encounter it as any user. Good luck, though.

Oh, duh - a 'chown -R user02 /home/user02' as root might help, too.

Last edited by slakmagik; 07-19-2007 at 12:14 PM.
 
Old 07-19-2007, 12:27 PM   #3
linexnal
LQ Newbie
 
Registered: Jul 2007
Posts: 29

Original Poster
Rep: Reputation: 15
hey you know any _detailed_ articles I can read as a guide? I'm having problems.

Is it just a one-step process? And the system automatically does the rest? b/c it doesn't seem like a one-step process...

Last edited by linexnal; 07-19-2007 at 12:28 PM.
 
Old 07-19-2007, 12:44 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
No, sorry, I don't know of any detailed articles, as it's not something that's done much, yet isn't especially complicated, AFAIK. What sort of problems are you having?

And I don't know what you mean by the last part. In answering 'Are there a few simple steps to move user01 files & preferences to user02?' I replied that the steps are to copy user01's files and dotfiles (files and preferences) to user02's $HOME. And then make sure they're all owned by user02 and then you should be done.

But, as I say, just deleting and then essentially recreating the account isn't likely to fix problems with that account. Since you say it "didn't go" to the desktop, I'm guessing you use a display manager and the problem is probably with that. If you log in to text mode, your virtual console should work fine. You might even be able to 'startx' and have X work fine if it's exclusively a display manager problem and not a general X problem. Which goes back to why I was saying it isn't something that's done often - your user01 account is probably generally fine and you'd be better off fixing the glitch than blowing out the whole account.
 
Old 07-19-2007, 01:28 PM   #5
linexnal
LQ Newbie
 
Registered: Jul 2007
Posts: 29

Original Poster
Rep: Reputation: 15
Well.. during the process it asked if I wanted to overwrite ... so I just pressed enter since it didn't ask for a letter like y or n or anything.

After pressing many enters, the outcome is that there is a /home/user02/user02 which appears to have the same files as in /home/user02/. Is that suppose to happen...

The other thing is.. is it suppose to transfer the KDE preferences and other software preferences? like firefox's preferences..
b/c it appears like some of the KDE preferences were moved but some are missing..

"Since you say it "didn't go" to the desktop, I'm guessing you use a display manager and the problem is probably with that. If you log in to text mode, your virtual console should work fine."
No, I'm able to log in now onto the KDE desktop. I never log into text mode b/c then I'm at a black screen, I guess a type of shell.. but I couldn't do anything like open firefox for example.
"I'm guessing you use a display manager"
I don't know what that is. I just know I use the KDE environment.. so you start the computer > login > now at desktop

Last edited by linexnal; 07-19-2007 at 01:43 PM.
 
Old 07-19-2007, 02:00 PM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally Posted by linexnal
Well.. during the process it asked if I wanted to overwrite ... so I just pressed enter since it didn't ask for a letter like y or n or anything.

After pressing many enters, the outcome is that there is a /home/user02/user02 which appears to have the same files. Is that suppose to happen...
Not sure what happened there. No, that shouldn't happen. The copying shouldn't be so much a 'process' as a single command with a single enter. True, though, if you'd already created the account it would've generated a /home/user02 and copied in the contents of /etc/skel so I should have told you to remove user02's home first before copying in user01's data in its place. That may have caused the 'overwrite' query, though that means your cp is aliased to 'cp -i'. Sorry there. Still not sure how it ended up creating that extra hierarchy. But at least an excess of files just means removing the redundancies, so no damage done.

Quote:
Originally Posted by linexnal
The other thing is.. is it suppose to transfer the KDE preferences and other software preferences? like firefox's preferences..
b/c it appears like some of the KDE preferences were moved but some are missing.
Well, your preferences for KDE are in ~/.kde and whatever other couple of directories they may put stuff in and your firefox preferences are in ~/.mozilla (or maybe ~/.firefox; I dunno because I don't use firefox) so if you copy those dotdirs, you get the prefs. All your prefs (that aren't inherited from system-wide defaults) are in dotfiles in your $HOME.

Quote:
Originally Posted by linexnal
"But, as I say, just deleting and then essentially recreating the account isn't likely to fix problems with that account. Since you say it "didn't go" to the desktop, I'm guessing you use a display manager and the problem is probably with that. If you log in to text mode, your virtual console should work fine."
No, I'm able to log in now onto the KDE desktop. I never log in to text mode b/c then I'm at a black screen, I guess a type of shell.. but I couldn't do anything like open firefox for example.
"I'm guessing you use a display manager"
I don't know what that is. I just know I use the KDE environment.. so you start the computer > login > now at desktop
Cool - surprised that cleared everything up, but that's good. Yeah, the text mode gives you your shell. You can run text mode browsers like lynx, but not graphical ones like firefox. As far as the display manager, I mean the graphical logon where you can type your name/password and select your 'session'. So that's an affirmative.

As far as straightening out the bit of a mess user02's $HOME might be in, you could use 'diff' (or probably a KDE GUI version) to check on the consistency of the directories. The reason to do a copy rather than a move is in case something went wrong (which it sounds like it sort of did), so you can do a 'diff /home/user01/.kde /home/user02/.kde' (and then apparently, a 'diff /home/user02/.kde /home/user02/user02/.kde) and so on and delete the redundancies. Make sure nothing's missing like you mentioned it might be, though it shouldn't be.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Quick & Simple Question benrose111488 Programming 7 01-06-2005 12:02 PM
quick rename many files cadj Programming 7 12-29-2004 05:14 AM
grant user access to /fat-c & copying users' preferences to another user n0x Linux - Newbie 1 07-04-2004 01:04 AM
redhat 6 & eth0 - need some quick help BrianK Linux - Networking 3 11-04-2002 11:26 PM
quick & easy way to rmdir's ??? rythomas Linux - General 10 06-07-2002 01:51 AM


All times are GMT -5. The time now is 02:36 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration