Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving and Renaming User Profiles

Status
Not open for further replies.

otheracco

Technical User
Feb 4, 2008
15
0
0
US
Hello, I've recently upgraded my hard drive. I have 2 linux distros running, and they were running under two different home directories, but to simplify things, I decided to point the MEPIS install to use the new, giant, 450GB /home partition on the Debian install.

To do this I've had to rename one of the profiles, as they both had the same name. After renaming, I copied everything over with 'cp /home/olddirectory * -r -f /home/newdirectory' but am now running into ownership errors and maybe a couple other errors (sorry I don't totally understand all the errors).

I'd like to know all of the profile specific files I have to chown and make other changed to so that my profile works.



 
If the user have the same UID on both systems,
I think you should be able to use:
Code:
'cp -pR /home/olddirectory /home/newdirectory
to copy the whole directory recursivly.
Notice the -p flag that preserves ownership.

If this doesnt work you might need to run a
Code:
chown -R newdirectoryowner /home/newdirectory
after copying the files.

HTH
:)
 
That's cool. I didn't know I could copy permissions over.

Thanks.
Unfortunately, I have another problem now.

After changing my $HOME variable to point to the new disk, I can't login under any user, even new ones that I create. I can still login to root, and that's how I am able to add new users to test (I think root must keep it's profile on the root drive instead of the $HOME drive).

Does anyone have any ideas on this? I've never changed to $HOME drive after installation before, but it seems like it should be able to be done.
 
And what does your /etc/passwd-file look like?
Does it refere to your new $HOME ???
 
It does, because $HOME is now mounted on the new partition. Below is the output from 'mount'. /dev/sda9 is correct. The old $HOME was /dev/sda11, which is no longer being mounted.

/dev/sda10 on / type ext3 (rw,noatime)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sda9 on /home type ext3 (rw,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

Here is what's contained is my 'passwd' file.

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
messagebus:x:100:102::/var/run/dbus:/bin/false
avahi:x:101:105:Avahi mDNS daemon:/var/run/avahi-daemon:/bin/false
haldaemon:x:102:109:Hardware abstraction layer:/home/haldaemon:/bin/false
saned:x:104:112::/home/saned:/bin/false
hplip:x:105:7:HPLIP system user:/var/run/hplip:/bin/false
clamav:x:106:113::/var/lib/clamav:/bin/false
Debian-ipw3945d:x:103:114::/home/Debian-ipw3945d:/bin/false
tss:x:107:116::/home/tss:/bin/false
chad:x:1000:1000:Chad:/home/chad:/bin/bash
test:x:1001:1000::/home/test:/bin/bash

What's happening is I login (at the KDE login manager) with a non-root account, the screen goes black for 2 seconds, and then it goes right back to the login screen.
 
At the login screen, hit Ctrl-Alt-F1
this should bring you to the text-based login screen.
Try logging in there and see what error messages you get.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top