LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-08-2013, 03:57 AM   #1
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Rep: Reputation: Disabled
Not able to log in due to editing /etc/pam.d/common-auth file!


Anyone please assist me as I am not able to log back in my Ubuntu12.10 OS.
I was working with "faillog" in order to monitor authentications.
I have a thread in this sub-forum related to "faillog" as below:
http://www.linuxquestions.org/questi....php?p=5004102

In that thread the below 2 links are there which I was following:
http://blog.bodhizazen.net/linux/ubuntu-how-to-faillog/
http://ubuntuforums.org/showthread.php?t=1497614

Now after reading these threads, I edited /etc/pam.d/common-auth file.
(As mentioned in the link)In the top of the file, I wrote :
Code:
auth required pam_tally.so per_user magic_root onerr=fail
With this edit, though I was able to login with a few difficulties.

Then I re-edited the file and wrote the same text in 2 lines as mentioned in the link. I wrote as below:
Code:
auth required pam_tally.so per_user 
magic_root onerr=fail
The mistake was I entered the text in 2 lines as shown above.

Now I am not able to log in with any registered users.

I am sending this mail after logging in as guest.

It was not easy to mail as a guest even as I was not having my this forum password which was chached when I used to login as my user id. I clicked on forgot password and then proceeded. Also I had the password written in a file in a hard disk partition but for mounting that partition, Ubuntu12.10 was asking me for super-user password which isnot working.
Is there any means to edit the common-auth file?
Waiting eagerly for anyones response!
Also I would like to add that I am looking for solutions from google though yet I couldn't get any.

Last edited by ravisingh1; 08-08-2013 at 04:02 AM.
 
Old 08-08-2013, 04:07 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400
Quote:
Originally Posted by ravisingh1
Is there any means to edit the common-auth file?
If you cannot become root user in any way then you can use a Linux live-cd to boot from. Then mount the partition that includes /etc and edit the /etc/pam.d/common-auth file.

Last edited by druuna; 08-08-2013 at 04:22 AM. Reason: spelling.
 
Old 08-08-2013, 04:21 AM   #3
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Original Poster
Rep: Reputation: Disabled
Thanks druuna. I am trying the way you wrote and update after that.
 
Old 08-08-2013, 05:15 AM   #4
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Original Poster
Rep: Reputation: Disabled
Thanks again druuna. I am currently replying after logging from my own user id which was earlier not getting authenticated by the system. I put live cd and mounted my root directory (on /mnt folder) where /etc is there. Then
Quote:
sudo chroot /mnt
. Then edited the /etc/pam.d/common-auth file (deleted the 1st 2 lines from top that I had added earlier). Then
Quote:
exit
sudo umount /mnt
sudo reboot
Now things are like before the issue.
Knowledge of "chroot" was required to do it which i had gained 2 months back when i was watching youtube videos on grub/installation,etc.

Last edited by ravisingh1; 08-08-2013 at 05:16 AM.
 
Old 08-08-2013, 05:21 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400
You're welcome.

BTW: Can you put up the [SOLVED] tag (top right corner / Thread Tools menu)
 
  


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
pam common- files arizonagroovejet Linux - General 2 07-29-2011 09:01 AM
Fingerprint reader + common-auth: how can it works? makaai Linux - Hardware 0 01-07-2009 11:05 AM
Cannot send mail due to exim log file permission zahoo Linux - General 3 11-03-2005 12:42 PM
Failing to log into ssh via ldap auth. Pam Problem? cehlers Linux - Security 1 10-10-2004 08:55 AM
log file editing.... wedgeworth Linux - Software 2 11-13-2003 07:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:14 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