Accidentally removed /etc/pam.d // How to reinstall packages in my arch from a live usb? [closed]











up vote
0
down vote

favorite












First of all sorry for my English



I have Antergos installed on my Notebook and I accidentally deleted the folder /etc/pam.d so i cannot use any root command neither access to my user session.
I thought about reinstalling the packages which have files installed in pam.d so i tried:



 pacman -S $(pacman -Ql | grep /etc/pam.d/$ | awk '{print $1}') 


into a live usb of Antergos. I did it after mounting the partitions /, /home and uefi in /mnt, /mnt/home and /mnt/boot/efi respectively. Then I did:



 sudo cp /etc/resolv.conf /mnt/etc/  
sudo cp /etc/hosts mnt/etc/
sudo mount --bind /dev/ /mnt/dev
sudo chroot /mnt
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts


And finally tried this options but all of them return the same error:



 pacman -S $(pacman -Ql | grep /etc/pam.d/$ | awk '{print $1}') 
pacman -Syu
pacman -Syyu
pacman -S libpam-runtime libpam-modules


error that returns:



 error: failed retrieving file ´´´´ from mirror.´´´´ : Could not resolve host: mirror.´´´´´ 


in the ´´´´ go the names of the corresponding files and mirrors



Can you help me recover the /pam.d folder in some way? Am I doing something wrong when I mount the partitions?



PS: I have connection to Internet and I also have a copy of the folder pam.d in /home/user/Downloads (I did the copy before remove it from /etc/)










share|improve this question









New contributor




Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as off-topic by chili555, DK Bose, muru, waltinator, clearkimura Nov 24 at 5:34


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – chili555, DK Bose, muru, waltinator, clearkimura

If this question can be reworded to fit the rules in the help center, please edit the question.

















    up vote
    0
    down vote

    favorite












    First of all sorry for my English



    I have Antergos installed on my Notebook and I accidentally deleted the folder /etc/pam.d so i cannot use any root command neither access to my user session.
    I thought about reinstalling the packages which have files installed in pam.d so i tried:



     pacman -S $(pacman -Ql | grep /etc/pam.d/$ | awk '{print $1}') 


    into a live usb of Antergos. I did it after mounting the partitions /, /home and uefi in /mnt, /mnt/home and /mnt/boot/efi respectively. Then I did:



     sudo cp /etc/resolv.conf /mnt/etc/  
    sudo cp /etc/hosts mnt/etc/
    sudo mount --bind /dev/ /mnt/dev
    sudo chroot /mnt
    mount -t proc none /proc
    mount -t sysfs none /sys
    mount -t devpts none /dev/pts


    And finally tried this options but all of them return the same error:



     pacman -S $(pacman -Ql | grep /etc/pam.d/$ | awk '{print $1}') 
    pacman -Syu
    pacman -Syyu
    pacman -S libpam-runtime libpam-modules


    error that returns:



     error: failed retrieving file ´´´´ from mirror.´´´´ : Could not resolve host: mirror.´´´´´ 


    in the ´´´´ go the names of the corresponding files and mirrors



    Can you help me recover the /pam.d folder in some way? Am I doing something wrong when I mount the partitions?



    PS: I have connection to Internet and I also have a copy of the folder pam.d in /home/user/Downloads (I did the copy before remove it from /etc/)










    share|improve this question









    New contributor




    Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.











    closed as off-topic by chili555, DK Bose, muru, waltinator, clearkimura Nov 24 at 5:34


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – chili555, DK Bose, muru, waltinator, clearkimura

    If this question can be reworded to fit the rules in the help center, please edit the question.















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      First of all sorry for my English



      I have Antergos installed on my Notebook and I accidentally deleted the folder /etc/pam.d so i cannot use any root command neither access to my user session.
      I thought about reinstalling the packages which have files installed in pam.d so i tried:



       pacman -S $(pacman -Ql | grep /etc/pam.d/$ | awk '{print $1}') 


      into a live usb of Antergos. I did it after mounting the partitions /, /home and uefi in /mnt, /mnt/home and /mnt/boot/efi respectively. Then I did:



       sudo cp /etc/resolv.conf /mnt/etc/  
      sudo cp /etc/hosts mnt/etc/
      sudo mount --bind /dev/ /mnt/dev
      sudo chroot /mnt
      mount -t proc none /proc
      mount -t sysfs none /sys
      mount -t devpts none /dev/pts


      And finally tried this options but all of them return the same error:



       pacman -S $(pacman -Ql | grep /etc/pam.d/$ | awk '{print $1}') 
      pacman -Syu
      pacman -Syyu
      pacman -S libpam-runtime libpam-modules


      error that returns:



       error: failed retrieving file ´´´´ from mirror.´´´´ : Could not resolve host: mirror.´´´´´ 


      in the ´´´´ go the names of the corresponding files and mirrors



      Can you help me recover the /pam.d folder in some way? Am I doing something wrong when I mount the partitions?



      PS: I have connection to Internet and I also have a copy of the folder pam.d in /home/user/Downloads (I did the copy before remove it from /etc/)










      share|improve this question









      New contributor




      Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      First of all sorry for my English



      I have Antergos installed on my Notebook and I accidentally deleted the folder /etc/pam.d so i cannot use any root command neither access to my user session.
      I thought about reinstalling the packages which have files installed in pam.d so i tried:



       pacman -S $(pacman -Ql | grep /etc/pam.d/$ | awk '{print $1}') 


      into a live usb of Antergos. I did it after mounting the partitions /, /home and uefi in /mnt, /mnt/home and /mnt/boot/efi respectively. Then I did:



       sudo cp /etc/resolv.conf /mnt/etc/  
      sudo cp /etc/hosts mnt/etc/
      sudo mount --bind /dev/ /mnt/dev
      sudo chroot /mnt
      mount -t proc none /proc
      mount -t sysfs none /sys
      mount -t devpts none /dev/pts


      And finally tried this options but all of them return the same error:



       pacman -S $(pacman -Ql | grep /etc/pam.d/$ | awk '{print $1}') 
      pacman -Syu
      pacman -Syyu
      pacman -S libpam-runtime libpam-modules


      error that returns:



       error: failed retrieving file ´´´´ from mirror.´´´´ : Could not resolve host: mirror.´´´´´ 


      in the ´´´´ go the names of the corresponding files and mirrors



      Can you help me recover the /pam.d folder in some way? Am I doing something wrong when I mount the partitions?



      PS: I have connection to Internet and I also have a copy of the folder pam.d in /home/user/Downloads (I did the copy before remove it from /etc/)







      permissions mount pam






      share|improve this question









      New contributor




      Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Nov 24 at 1:31









      abu_bua

      3,06281023




      3,06281023






      New contributor




      Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 24 at 0:58









      Lucio Fontanari

      1




      1




      New contributor




      Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Lucio Fontanari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      closed as off-topic by chili555, DK Bose, muru, waltinator, clearkimura Nov 24 at 5:34


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – chili555, DK Bose, muru, waltinator, clearkimura

      If this question can be reworded to fit the rules in the help center, please edit the question.




      closed as off-topic by chili555, DK Bose, muru, waltinator, clearkimura Nov 24 at 5:34


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – chili555, DK Bose, muru, waltinator, clearkimura

      If this question can be reworded to fit the rules in the help center, please edit the question.



























          active

          oldest

          votes






















          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

           ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕