Modified "/etc/passwd", unable to login as root!
Hi guys,
I made mistake in /etc/passwd file(Cent OS). In the file I change root::/bin/bash to /sbin/nologin. so I cannot enter the root. but I enter the users and i tried to change /bin/bash but permission denied. please help me. its a important and urgent one. Thank you. |
Use a Linux install cd/dvd and start into rescue mode. For a Red Hat based Linux distro (e.g. CentOS), at the start prompt, type `linux rescue`. Work through the prompts until it drops you to a shell. Then edit your /etc/passwd which should be mounted under `/mnt/sysimage`.
|
Have you tried booting up in Single User Mode?
|
yes I tried but cannot enter the single user mode
becoz display like /dev/root no such a file directory and something |
tulsi
Label your thread title as follows: Quote:
|
better to use rescue mode
|
seems pretty simple...
boot up any ubuntu or debian-live cd autologin to user desktop open a terminal and become root sudo su open a file manager as root (example ubuntu) sudo nautilus and then edit /etc/passwd your done:) |
Thanks all of you
The problem will be solved I tried to single user mode again in grub edit menu -> then end of second line like vmlinuz .....quiet S (i enter S) then go to runlevel 1 and I change the /etc/passwd file. Thanks for all once again |
I've fixed the thread title to make it easier to find and search for.
|
All times are GMT -5. The time now is 07:02 AM. |