.pam_environment not applied on first login but applied on successive logins

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have a ~/.pam_environment file. When I start my computer and login, those environment variables are not applied, but when I logout and login again they are applied.










share|improve this question

























    up vote
    0
    down vote

    favorite












    I have a ~/.pam_environment file. When I start my computer and login, those environment variables are not applied, but when I logout and login again they are applied.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a ~/.pam_environment file. When I start my computer and login, those environment variables are not applied, but when I logout and login again they are applied.










      share|improve this question













      I have a ~/.pam_environment file. When I start my computer and login, those environment variables are not applied, but when I logout and login again they are applied.







      ecryptfs pam-environment






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 7 at 22:20









      Bram Geron

      12811




      12811




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          If you are using encrypted home directories using ecryptfs, then perhaps the system attempts to read ~/.pam_environment before unlocking your home directory.



          Here's a workaround which makes the file unencrypted. You will need sudo powers.



          1. Close all programs, because some programs are going to crash using this method.

          2. Open a terminal.

          3. Go to your home directory by running cd

          4. Move the file to the unencrypted ~/.ecryptfs directory by running mv .pam_environment .ecryptfs/

          5. Make the file accessible from the decrypted environment: ln -s .ecryptfs/.pam_environment


          6. Exit the decrypted environment by running ecryptfs-umount-private. Although you will likely get a "Sessions still open, not unmounting" warning, it seems that the exiting still worked. You can confirm by attempting to run ecryptfs-umount-private again.



            Your decrypted home directory is now not accessible, and it is normal to get lots of errors on your terminal because programs (e.g. shells) weren't built for this. You should be able to continue nonetheless. Avoid starting programs as much as possible until you reboot in step 8.



          7. Make the file accessible from the non-decrypted environment by running sudo ln -s ~/.ecryptfs/.pam_environment.

          8. Reboot your computer. You should now hopefully have .pam_environment applied from the first login.

          Related link:



          • https://bugs.launchpad.net/ubuntu/+source/pam/+bug/584249

          • https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/1748036





          share|improve this answer






















          • (Per StackExchange policy, it is ~fine~ encouraged to self-answer your questions if you want to document a solution to a problem you had: stackoverflow.blog/2011/07/01/…)
            – Bram Geron
            Feb 7 at 22:22










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004034%2fpam-environment-not-applied-on-first-login-but-applied-on-successive-logins%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          If you are using encrypted home directories using ecryptfs, then perhaps the system attempts to read ~/.pam_environment before unlocking your home directory.



          Here's a workaround which makes the file unencrypted. You will need sudo powers.



          1. Close all programs, because some programs are going to crash using this method.

          2. Open a terminal.

          3. Go to your home directory by running cd

          4. Move the file to the unencrypted ~/.ecryptfs directory by running mv .pam_environment .ecryptfs/

          5. Make the file accessible from the decrypted environment: ln -s .ecryptfs/.pam_environment


          6. Exit the decrypted environment by running ecryptfs-umount-private. Although you will likely get a "Sessions still open, not unmounting" warning, it seems that the exiting still worked. You can confirm by attempting to run ecryptfs-umount-private again.



            Your decrypted home directory is now not accessible, and it is normal to get lots of errors on your terminal because programs (e.g. shells) weren't built for this. You should be able to continue nonetheless. Avoid starting programs as much as possible until you reboot in step 8.



          7. Make the file accessible from the non-decrypted environment by running sudo ln -s ~/.ecryptfs/.pam_environment.

          8. Reboot your computer. You should now hopefully have .pam_environment applied from the first login.

          Related link:



          • https://bugs.launchpad.net/ubuntu/+source/pam/+bug/584249

          • https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/1748036





          share|improve this answer






















          • (Per StackExchange policy, it is ~fine~ encouraged to self-answer your questions if you want to document a solution to a problem you had: stackoverflow.blog/2011/07/01/…)
            – Bram Geron
            Feb 7 at 22:22














          up vote
          1
          down vote













          If you are using encrypted home directories using ecryptfs, then perhaps the system attempts to read ~/.pam_environment before unlocking your home directory.



          Here's a workaround which makes the file unencrypted. You will need sudo powers.



          1. Close all programs, because some programs are going to crash using this method.

          2. Open a terminal.

          3. Go to your home directory by running cd

          4. Move the file to the unencrypted ~/.ecryptfs directory by running mv .pam_environment .ecryptfs/

          5. Make the file accessible from the decrypted environment: ln -s .ecryptfs/.pam_environment


          6. Exit the decrypted environment by running ecryptfs-umount-private. Although you will likely get a "Sessions still open, not unmounting" warning, it seems that the exiting still worked. You can confirm by attempting to run ecryptfs-umount-private again.



            Your decrypted home directory is now not accessible, and it is normal to get lots of errors on your terminal because programs (e.g. shells) weren't built for this. You should be able to continue nonetheless. Avoid starting programs as much as possible until you reboot in step 8.



          7. Make the file accessible from the non-decrypted environment by running sudo ln -s ~/.ecryptfs/.pam_environment.

          8. Reboot your computer. You should now hopefully have .pam_environment applied from the first login.

          Related link:



          • https://bugs.launchpad.net/ubuntu/+source/pam/+bug/584249

          • https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/1748036





          share|improve this answer






















          • (Per StackExchange policy, it is ~fine~ encouraged to self-answer your questions if you want to document a solution to a problem you had: stackoverflow.blog/2011/07/01/…)
            – Bram Geron
            Feb 7 at 22:22












          up vote
          1
          down vote










          up vote
          1
          down vote









          If you are using encrypted home directories using ecryptfs, then perhaps the system attempts to read ~/.pam_environment before unlocking your home directory.



          Here's a workaround which makes the file unencrypted. You will need sudo powers.



          1. Close all programs, because some programs are going to crash using this method.

          2. Open a terminal.

          3. Go to your home directory by running cd

          4. Move the file to the unencrypted ~/.ecryptfs directory by running mv .pam_environment .ecryptfs/

          5. Make the file accessible from the decrypted environment: ln -s .ecryptfs/.pam_environment


          6. Exit the decrypted environment by running ecryptfs-umount-private. Although you will likely get a "Sessions still open, not unmounting" warning, it seems that the exiting still worked. You can confirm by attempting to run ecryptfs-umount-private again.



            Your decrypted home directory is now not accessible, and it is normal to get lots of errors on your terminal because programs (e.g. shells) weren't built for this. You should be able to continue nonetheless. Avoid starting programs as much as possible until you reboot in step 8.



          7. Make the file accessible from the non-decrypted environment by running sudo ln -s ~/.ecryptfs/.pam_environment.

          8. Reboot your computer. You should now hopefully have .pam_environment applied from the first login.

          Related link:



          • https://bugs.launchpad.net/ubuntu/+source/pam/+bug/584249

          • https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/1748036





          share|improve this answer














          If you are using encrypted home directories using ecryptfs, then perhaps the system attempts to read ~/.pam_environment before unlocking your home directory.



          Here's a workaround which makes the file unencrypted. You will need sudo powers.



          1. Close all programs, because some programs are going to crash using this method.

          2. Open a terminal.

          3. Go to your home directory by running cd

          4. Move the file to the unencrypted ~/.ecryptfs directory by running mv .pam_environment .ecryptfs/

          5. Make the file accessible from the decrypted environment: ln -s .ecryptfs/.pam_environment


          6. Exit the decrypted environment by running ecryptfs-umount-private. Although you will likely get a "Sessions still open, not unmounting" warning, it seems that the exiting still worked. You can confirm by attempting to run ecryptfs-umount-private again.



            Your decrypted home directory is now not accessible, and it is normal to get lots of errors on your terminal because programs (e.g. shells) weren't built for this. You should be able to continue nonetheless. Avoid starting programs as much as possible until you reboot in step 8.



          7. Make the file accessible from the non-decrypted environment by running sudo ln -s ~/.ecryptfs/.pam_environment.

          8. Reboot your computer. You should now hopefully have .pam_environment applied from the first login.

          Related link:



          • https://bugs.launchpad.net/ubuntu/+source/pam/+bug/584249

          • https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/1748036






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 7 at 22:48

























          answered Feb 7 at 22:20









          Bram Geron

          12811




          12811











          • (Per StackExchange policy, it is ~fine~ encouraged to self-answer your questions if you want to document a solution to a problem you had: stackoverflow.blog/2011/07/01/…)
            – Bram Geron
            Feb 7 at 22:22
















          • (Per StackExchange policy, it is ~fine~ encouraged to self-answer your questions if you want to document a solution to a problem you had: stackoverflow.blog/2011/07/01/…)
            – Bram Geron
            Feb 7 at 22:22















          (Per StackExchange policy, it is ~fine~ encouraged to self-answer your questions if you want to document a solution to a problem you had: stackoverflow.blog/2011/07/01/…)
          – Bram Geron
          Feb 7 at 22:22




          (Per StackExchange policy, it is ~fine~ encouraged to self-answer your questions if you want to document a solution to a problem you had: stackoverflow.blog/2011/07/01/…)
          – Bram Geron
          Feb 7 at 22:22

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004034%2fpam-environment-not-applied-on-first-login-but-applied-on-successive-logins%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

          Trouble downloading packages list due to a “Hash sum mismatch” error

          How do I move numbers in filenames, in a batch renaming operation?