FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 08-08-2012, 02:22 PM
Alan McKinnon
 
Default recovering pam.d directory

On Wed, 8 Aug 2012 13:24:17 +0000
Marcello Varisco <marcelo.varesini@hotmail.com> wrote:

>
> Hi all,
>
> By incident I removed the pam.d directory containing all pam modules
> from command line. Is there a way to recover the removed directory?
> any help is appreciated since I can't login to my computer without
> live cd anymore.


Unless you have some amazing recovery tools to had (most people don't)
you can't easily recover those files.

pam.d isn't put there by a single package, everything that uses pam is
liable to write it's own custom file there. You can regain your ability
to log in by remerging these packages:

sys-apps/shadow
sys-auth/pambase

To do that, you will need to boot off a livecd and chroot. Then a
reboot should see you fine. Then you could rememrge everything that has
pam in USE and hope this is enough.

Or, you could restore from backups. You *do* have backups of /etc,
right?




--
Alan McKinnon
alan.mckinnon@gmail.com
 
Old 08-09-2012, 07:51 AM
Bryan Gardiner
 
Default recovering pam.d directory

On August 8, 2012 04:22:28 PM Alan McKinnon wrote:
> On Wed, 8 Aug 2012 13:24:17 +0000
>
> Marcello Varisco <marcelo.varesini@hotmail.com> wrote:
> > Hi all,
> >
> > By incident I removed the pam.d directory containing all pam modules
> > from command line. Is there a way to recover the removed directory?
> > any help is appreciated since I can't login to my computer without
> > live cd anymore.
>
> Unless you have some amazing recovery tools to had (most people don't)
> you can't easily recover those files.
>
> pam.d isn't put there by a single package, everything that uses pam is
> liable to write it's own custom file there. You can regain your ability
> to log in by remerging these packages:
>
> sys-apps/shadow
> sys-auth/pambase
>
> To do that, you will need to boot off a livecd and chroot. Then a
> reboot should see you fine. Then you could rememrge everything that has
> pam in USE and hope this is enough.
>
> Or, you could restore from backups. You *do* have backups of /etc,
> right?

Also, qcheck from portage-utils can list out all packages that are missing
files from /etc/pam.d, so you can know which packages need remerging. Run
"qcheck --all" and look for "AFK: /etc/pam.d/....." in the output.

HTH,
Bryan
 

Thread Tools




All times are GMT. The time now is 02:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org