nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Cannot Login

This is a discussion on Cannot Login within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; HI, I have got a problem with my login. I am not able to login through local console or ssh ...


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 04-26-2008, 10:03 AM
Junior Member
User
 
Join Date: Apr 2008
My distro: CentOS and RHEL
Posts: 15
Rep Power: 0
mvibin is on a distinguished road
Question Cannot Login

HI,

I have got a problem with my login. I am not able to login through local console or ssh to my machine. In sshd_config file, i have changed the port no. Used DenyUsers, DenyGroups, AllowUsers and blocked the root login. I also used the /etc/hosts.allow to deny some domains,

sshd: .hinet.net deny

I tried to take backup using this command

tar -zcvpf /archive/full-backup-`date '+%d-%B-%Y'`.tar.gz \
--directory / --exclude=mnt --exclude=proc --exclude=var/spool/squid

but it never worked. Now i am not able to login to my machine through ssh or local console. In local console when logging in, it falls back to the login screen saying "Authentication Failure" in a flash.

Please help me get out of this soup. Thanking you all in advance.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-29-2008, 02:51 PM
Administrator
User
 
Join Date: Apr 2007
Posts: 10
Rep Power: 10
root has disabled reputation
Default

You need to reset those settings login into single user mode and remove root user from sshd_config file.
Reply With Quote
  #3 (permalink)  
Old 04-29-2008, 03:50 PM
Junior Member
User
 
Join Date: Apr 2008
My distro: CentOS and RHEL
Posts: 15
Rep Power: 0
mvibin is on a distinguished road
Question Re

Thanks for ur comment. I would like to know whether any of my configuration files will be affected if get in to single user mode and also can i be able to access the / filesystem in single user mode. Please give me suggestions.

I am using CentOS now .. can i boot up with RHEL 4.0 cd to get in to single user mode ?

Last edited by mvibin; 04-29-2008 at 04:03 PM.
Reply With Quote
  #4 (permalink)  
Old 04-30-2008, 02:31 AM
Administrator
User
 
Join Date: Apr 2007
Posts: 10
Rep Power: 10
root has disabled reputation
Default

You need to use CentOS cd only to boot into emergency mode. You can access / in a single user mode. To fix this problem at Grub boot screen:
  1. Select the kernel
  2. Press the e key to edit the entry
  3. Select second line (the line starting with the word kernel)
  4. Press the e key to edit kernel entry so that you can append single user mode
  5. Append the letter S (or word Single) to the end of the (kernel) line
  6. Press ENTER key
  7. Now press the b key to boot the Linux kernel into single user mode
You need to mount at least / and other partitions:
Code:
mount -t proc proc /proc
mount -o remount,rw /
Now edit file /etc/ssh/sshd_config and allow root user. If you forgotten root password, just set new password, enter:
Code:
passwd root
We have plenty of docs about grub and booting into a single user mode:

Linux: Grub Boot into single user mode



Linux reset forgotten root password


How to: Recovering Linux grub boot loader password
Reply With Quote
  #5 (permalink)  
Old 04-30-2008, 10:32 AM
Junior Member
User
 
Join Date: Apr 2008
My distro: CentOS and RHEL
Posts: 15
Rep Power: 0
mvibin is on a distinguished road
Exclamation Re

Thans for ur comment. Do i need a bootup disk to get the Single User mode? If my filesystem is not corrupted then y should i remount the / partition? If i should, then how? How can i edit the sshd_config file from Single user mode? Is vi command available in Single User Mode? Can we edit the conf file with cat command? The grub boot screen is the splash image which enable us to select the OS, isn't it ? U are asking me to select the OS and press e to edit .. right ?

Can you explain in steps what should i do to get it fixed? Please help me. Thanking you in advance.
Reply With Quote
  #6 (permalink)  
Old 05-14-2008, 09:40 AM
Junior Member
User
 
Join Date: Apr 2008
My distro: CentOS and RHEL
Posts: 15
Rep Power: 0
mvibin is on a distinguished road
Default Re

Thanks a lot for all ...

I have fixed that problem, the steps i followed are,

1. Boot in to Single User Mode.

2. Corrected some configuration files using vim editor.

3. Restart the system forcing a file check with the command.

shutdown -rF now

Once again thanks for all ...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Unable to login !!! raina_ajeet Linux software 5 01-16-2008 01:22 AM
dovecot: pop3-login: pop3-login: error while loading shared libraries: libsepol.so.1 raj Mail Servers 1 11-15-2007 10:43 AM
login sparky Shell scripting 1 06-26-2006 07:17 PM
How do I Double KDM (KDE) Login Screens? tom Linux software 1 06-09-2005 02:34 PM
Login Without asking password sonaikar Linux software 1 02-20-2005 04:46 PM


All times are GMT +5.5. The time now is 05:51 AM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36