LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-26-2010, 07:34 AM   #1
vonedaddy
Member
 
Registered: Aug 2004
Location: Philadelphia,PA
Posts: 185

Rep: Reputation: 17
edited /etc/pam.d/system-auth-ac Now machine is locked


I will say from the beginnning that I am a beginner when speaking about pam. I have a system which was thowing errors in /var/log/secure like these:


crond[27099]: pam_tally(crond:account): unknown option: no_magic_root


So I was advised by soemone (who absolutely swore he new what he was doing) to copy the /etc/pam.d/system-auth-ac file from another system to clear these errors.

I did what he suggested now I am locked out of the box. Can not log in as root from console, and I can not get to single user mode by editing the line in grub.

Anyone have any ideas to help??
 
Old 10-26-2010, 08:19 AM   #2
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
You can download disk 1 of CentOS from www.centos.org.

Let the machine boot from the disk.

Type linux rescue to boot the machine in rescue mode.

Choose the option to allow access to the hard drive

If you had made a copy of your original configuration file, you can use it to replace the one that is causing the problem.

If you didn't make a copy, you can backup the existing file and then edit it.

You should be able to do something similar with a live cd from Ubuntu.

The ability to boot from cd's is the main reason why security documents always recommend limiting physical access to your servers. It really doesn't matter which operating system you use.

It is very important to copy configuration files to a safe place before editing or replacing them.

Last edited by jamrock; 10-26-2010 at 08:25 AM.
 
1 members found this post helpful.
Old 10-26-2010, 08:29 AM   #3
vonedaddy
Member
 
Registered: Aug 2004
Location: Philadelphia,PA
Posts: 185

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by jamrock View Post
You can download disk 1 of CentOS from www.centos.org.

Let the machine boot from the disk.

Type linux rescue to boot the machine in rescue mode.

Choose the option to allow access to the hard drive

If you had made a copy of your original configuration file, you can use it to replace the one that is causing the problem.

If you didn't make a copy, you can backup the existing file and then edit it.

You should be able to do something similar with a live cd from Ubuntu.

The ability to boot from cd's is the main reason why security documents always recommend limiting physical access to your servers. It really doesn't matter which operating system you use.

It is very important to copy configuration files to a safe place before editing or replacing them.

Thanks so much, I did make a backup of the file in the same directory.

I have copies of the redhat install CD's can I also boot with those?
 
Old 10-26-2010, 08:32 AM   #4
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
CentOS is a clone of Red Hat. You can boot from the Red Hat cd 1.

Let us know how it turns out.
 
Old 10-26-2010, 11:05 AM   #5
vonedaddy
Member
 
Registered: Aug 2004
Location: Philadelphia,PA
Posts: 185

Original Poster
Rep: Reputation: 17
Thats for the help, everything worked out great!

Learn something new everyday! I really appreciate your assistance.
 
Old 10-26-2010, 11:17 AM   #6
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Cool... No problem...

It must be scary when you can't log into your server.

Please mark the thread as solved. It might help someone else.

Last edited by jamrock; 10-26-2010 at 11:19 AM.
 
  


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
Password Complexity after changing the /etc/pam.d/system-auth the system dies kprakashc Linux - Newbie 0 08-27-2008 09:50 PM
pam settings system-auth sachinh Linux - General 3 03-21-2008 12:07 AM
/etc/pam.d/system-auth is not found udayakumarsv SUSE / openSUSE 1 01-30-2008 04:59 PM
code for /etc/pam.d/system-auth(password complexity) moinpasha Programming 0 09-18-2006 01:23 AM
pam.d/system-auth and LDAP? SheldonPlankton Linux - General 0 04-28-2005 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:11 PM.

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
Open Source Consulting | Domain Registration