choyaumeshu
2009-Sep-03 07:00 UTC
[CentOS] did CentOS x86 5.3 migrate to another hard drive, but console login keeps prompting even with correct password
first time poster here - hello everyone I started out with CentOS x86 5.3 with the following partitions on my source hard drive: /dev/hdc1 swap /dev/hdc2 / I did the following to migrate my CentOS box to the destination hard drive: 1. boot up with CentOS 5.3 livecd in rescue mode 2. partition destination hard drive (/dev/hdd) /dev/hdd1 swap /dev/hdd2 / 3. create the filesystem on the destination hard drive mke2fs -j /dev/hdd2 mkswap /dev/hdd1 4. mount partitions and then copied files from /dev/hdc2 to /dev/hdd2 mount /dev/hdc2 /mnt/aa mount /dev/hdd2 /mnt/bb cd /mnt/aa tar --one-file-system -cf - . | tar -xpf - -C /mnt/bb 5. modify /boot/grub/menu.lst on both /dev/hdc2 and /dev/hdd2 6. modify /etc/fstab and /etc/mtab 7. umount partitions 8. run grub 9. reboot out of rescue mode The original system still boots up fine and I am able to login. The new system which is supposedly a copy of the original system seems to boot up fine (everything had green OK), but I have problems at the login prompt. If I login with incorrect password, I get a message telling me that login is incorrect. If I try to login with the correct password, the system seems to accept the password, but then prompts me again to login, and it keeps doing this when I continually try to login. additional info: 1. can boot up system in single user mode 2. sshd is up but can't ssh in even with correct password here's the output (i modified the user name and the ip address) ssh -l user1 ipaddress user1 at ipaddress's password: /bin/bash: Permission denied Connection to ipaddress closed. I'm sorry if this has already been addressed in the forums/mailinglists, but my attempted search didn't show me anything fruitful. Also, I'd don't want to use dd, and I would prefer not to use partimage. Your help will be appreciated and thanks for reading this far. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20090903/9c41f2f4/attachment-0001.html>
Nicolas Thierry-Mieg
2009-Sep-03 08:51 UTC
[CentOS] did CentOS x86 5.3 migrate to another hard drive, but console login keeps prompting even with correct password
choyaumeshu wrote:> first time poster here - hello everyone > ><snip>> tar --one-file-system -cf - . | tar -xpf - -C /mnt/bb<snip> hi, a wild guess: --selinux ?
Mogens Kjaer
2009-Sep-03 08:55 UTC
[CentOS] did CentOS x86 5.3 migrate to another hard drive, but console login keeps prompting even with correct password
On 09/03/2009 09:00 AM, choyaumeshu wrote: ...> tar --one-file-system -cf - . | tar -xpf - -C /mnt/bb...> /bin/bash: Permission deniedLooks like a SELinux problem. Try booting in rescue mode, mount root, and do a touch /mnt/sysimage/.autorelabel and a reboot. Mogens -- Mogens Kjaer, Carlsberg A/S, Computer Department Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark Phone: +45 33 27 53 25, Fax: +45 33 27 47 08 Email: mk at crc.dk Homepage: http://www.crc.dk
John Doe
2009-Sep-03 09:03 UTC
[CentOS] did CentOS x86 5.3 migrate to another hard drive, but console login keeps prompting even with correct password
From: choyaumeshu <choyaumeshu at gmail.com>>I did the following to migrate my CentOS box to the destination hard drive: >5. modify /boot/grub/menu.lst on both /dev/hdc2 and /dev/hdd2 >6. modify /etc/fstab and /etc/mtab >additional info: >1. can boot up system in single user mode >2. sshd is up but can't ssh in even with correct passwordNothing in the logs? Maybe do an strace on the login and try to see what makes it fail. I would suspect a missing suid bit (to read /etc/shadow by example)... Try 'rpm -qaV' BTW, did you change all the machine specific things like MAC addresses, ssh server private keys, etc...? JD
Nobody ist perfect
2009-Sep-04 08:43 UTC
[CentOS] did CentOS x86 5.3 migrate to another hard drive, but console login keeps prompting even with correct password
Hi! check perms on /tmp for example chown -R root.root /tmp & chmod 777 /tmp choyaumeshu schrieb:> first time poster here - hello everyone > > > I started out with CentOS x86 5.3 with the following partitions on my > source hard drive: > /dev/hdc1 swap > /dev/hdc2 / > > > I did the following to migrate my CentOS box to the destination hard drive: > 1. boot up with CentOS 5.3 livecd in rescue mode > 2. partition destination hard drive (/dev/hdd) > /dev/hdd1 swap > /dev/hdd2 / > 3. create the filesystem on the destination hard drive > mke2fs -j /dev/hdd2 > mkswap /dev/hdd1 > 4. mount partitions and then copied files from /dev/hdc2 to /dev/hdd2 > mount /dev/hdc2 /mnt/aa > mount /dev/hdd2 /mnt/bb > cd /mnt/aa > tar --one-file-system -cf - . | tar -xpf - -C /mnt/bb > 5. modify /boot/grub/menu.lst on both /dev/hdc2 and /dev/hdd2 > 6. modify /etc/fstab and /etc/mtab > 7. umount partitions > 8. run grub > 9. reboot out of rescue mode > > > The original system still boots up fine and I am able to login. The new > system which is supposedly a copy of the original system seems to boot > up fine (everything had green OK), but I have problems at the login > prompt. If I login with incorrect password, I get a message telling me > that login is incorrect. If I try to login with the correct password, > the system seems to accept the password, but then prompts me again to > login, and it keeps doing this when I continually try to login. > > > additional info: > 1. can boot up system in single user mode > 2. sshd is up but can't ssh in even with correct password > here's the output (i modified the user name and the ip address) > ssh -l user1 ipaddress > user1 at ipaddress's password: > /bin/bash: Permission denied > Connection to ipaddress closed. > > > I'm sorry if this has already been addressed in the forums/mailinglists, > but my attempted search didn't show me anything fruitful. Also, I'd > don't want to use dd, and I would prefer not to use partimage. Your help > will be appreciated and thanks for reading this far. > > > ------------------------------------------------------------------------ > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos