Questions tagged [pam-environment]

In ~/.pam_environment are set the session environment variables.

This file is specifically meant for setting a user's environment. It is not a script file, but rather consists of assignment expressions, one per line. Using .pam_environment requires a re-login in order to initialize the variables. Restarting just the terminal is not sufficient to be able to use the variables.

19 questions
11
votes
1 answer

how to setup two factor authentication in Ubuntu for Ubuntu users using Google authenticator?

How to setup two factor authentication in Ubuntu for Ubuntu users using Google authenticator (It can also be setup for non Google accounts)?
Hrish
  • 2,313
  • 13
  • 42
  • 63
9
votes
4 answers

Dollar sign in environment variable's value

Is it a bad practice to have a dollar sign in an environment variable's value? ex: MY_VAR="$toto" To be more precise, I would like to set it in the /etc/environment file to be accessible by a java program. I did a test and it's working but I just…
jon
  • 193
  • 1
  • 1
  • 5
6
votes
1 answer

~/.pam_environment doesn't work since Ubuntu 13.04

I have this line in my ~/.pam_environment: PATH DEFAULT=${HOME}/bin:${HOME}/.local/bin:${PATH} and it worked perfectly well on Ubuntu 12.10, but since I've updated to 13.04 it is completely ignored: $ echo…
szx
  • 548
  • 1
  • 6
  • 16
5
votes
2 answers

What's the right place to set the XAUTHORITY environment variable?

I'm trying to get rid of the .Xauthority file in my home directory. The arch wiki suggests defining export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority but neither placing this line in .profile nor adding XAUTHORITY…
soc
  • 219
  • 1
  • 2
  • 7
5
votes
3 answers

How to set session-wide environment variables and PATH?

I have seen other people on the Internet also having this problem but the solutions have been non-conclusive, so I wanted to bring it to attention again. According to this page in Ubuntu…
alvarez
  • 153
  • 1
  • 4
5
votes
2 answers

PATH is not affected by .pam_environment

Running Ubuntu 13.04, I'm trying to add variables to PATH for the session, which is recommended to do inside .pam_environment, but nothing seems to work. Here's what it looks like: JAVA_HOME DEFAULT=/usr/lib/jvm/java-7-oracle IDEA_HOME …
Eliran Malka
  • 1,205
  • 18
  • 36
3
votes
0 answers

nofile limit not changed for sh command in non-interactive session

Running 12.04.3 LTS A user submitting a batch job to the queue was receiving a 'too many open files error' Investigation suggested changing the /etc/security/limits.conf file which has been done both for all users and for root individually…
Libby
  • 31
  • 2
3
votes
1 answer

Why this .pam_environment setting prevents me from logging in?

I'm trying to move things from my .bashrc to .pam_enviroment because of this. I've put the following into my .pam_environment but this prevents me from logging in because there should be some mistake. I've then removed .pam_environment while in…
oblitum
  • 1,677
  • 2
  • 16
  • 27
3
votes
1 answer

Help Understanding Line in .bashrc

I've tried looking everywhere to determine what this line does in my .bashrc. The reason I want to know is because now ~/.pam_environment is recommended. This is the line: [[ -s /home/$USER/.nvm/nvm.sh ]] && . /home/$USER/.nvm/nvm.sh I think I've…
Adam Beck
  • 31
  • 1
2
votes
2 answers

.pam_environment not loaded in TTY

I have environment variables set in ~/.pam_environment and they exist as expected in any graphical terminal emulator I open. If I open a virtual terminal, e.g. TTY1, and login, my PAM environment variables are not present. How can I ensure…
kzh
  • 866
  • 2
  • 10
  • 23
1
vote
0 answers

Local modifications to /etc/pam.d/common-*, not updating

Just like any normal day, I ran "sudo apt upgrade", but it gave me this: Local modifications to /etc/pam.d/common-*, not updating. pam-auth-update: Run pam-auth-update --force to override. What should I do here? I did run "pam-auth-update --force"…
Pranav
  • 1,142
  • 2
  • 14
  • 30
0
votes
0 answers

Is it safe to comment out kwallet in lightdm and lightdm-greeter?

I have a problem. I am getting some annoying logs of pam_kwallet not found. This is because of kwallet is not installed in my system. If I run the command more /etc/pam.d/* I am getting the below output: - I found that in lightdm and…
Aravind
  • 886
  • 1
  • 11
  • 24
0
votes
0 answers

pam_authenticate return's PAM_MODULE_UNKNOWN ( returns 28 ), how to resolve?

Downloaded the source Linux-PAM-1.3.0.tar.gz version then, configured and compiled using command ./configure --prefix=/u02/tasks/linux-pam/Linux-PAM-1.3.0/output/pre --exec-prefix=/u02/tasks/linux-pam/Linux-PAM-1.3.0/output/epre…
manikanta
  • 443
  • 2
  • 6
  • 19
0
votes
1 answer

How do I deny a particular user from getting root ( through su ) in a terminal by changing the /etc/pam.d/su ? Pam based controlling is required

There are two users in ubuntu (let's call them user1 and user2). Currently, user1 can get access root access using the below commands: user1@sai:~$ su Password: root@sai:/home/user1# However, I want to deny user1 from getting root access, and…
manikanta
  • 443
  • 2
  • 6
  • 19
0
votes
0 answers

How to log into another user if the entered password is wrong?

How tp configure PAM in order to log as a special user (call it wrongpass-user) if a wrong password is entered for any other user?
user123456
  • 2,348
  • 5
  • 31
  • 53
1
2