** Description changed:
When the .pam_environment file of an user is created for the first time
- the format will be wrong:
+ the format will be wrong, if the default shell is switched from dash to
+ bash:
cat .pam_environment
LANGUAGE\tDEFAULT=de_DE:en
LANG\tDEFAULT=de_DE.UTF-8
LC_NUMERIC\tDEFAULT=en_US.UTF-8
LC_TIME\tDEFAULT=en_US.UTF-8
LC_MONETARY\tDEFAULT=en_US.UTF-8
LC_PAPER\tDEFAULT=en_US.UTF-8
LC_NAME\tDEFAULT=en_US.UTF-8
LC_ADDRESS\tDEFAULT=en_US.UTF-8
LC_TELEPHONE\tDEFAULT=en_US.UTF-8
LC_MEASUREMENT\tDEFAULT=en_US.UTF-8
LC_IDENTIFICATION\tDEFAULT=en_US.UTF-8
PAPERSIZE\tDEFAULT=letter
LANGUAGE\tDEFAULT=en_US:en
LANG\tDEFAULT=en_US.UTF-8
LANGUAGE\tDEFAULT=de_DE:en
LANG\tDEFAULT=de_DE.UTF-8
LANGUAGE\tDEFAULT=en_US:en
LANG\tDEFAULT=en_US.UTF-8
LANGUAGE\tDEFAULT=de_DE:en
LANG\tDEFAULT=de_DE.UTF-8
Because of a missing command parameter in the script
/usr/share/language-tools/save-to-pam-env the tabulators will not be
generated but insert as normal characters. Therefore the pam_environment
file will not work.
- The error is in the function save_to_pam_env(), there is an -e missing
- at the echo command:
+ The problematic step is in the function save_to_pam_env(), there is a -e
+ missing at the echo command for using with bash:
save_to_pam_env() {
- var=$1; value=$2
- if [ "$( grep -E "^$var(\s+DEFAULT|=)" .pam_environment )" ]; then
- sed -r -i "s/^$var(\s+DEFAULT|=).*/$var\tDEFAULT=$value/"
.pam_environment
- else
- echo "$var\tDEFAULT=$value" >> .pam_environment
- fi
+ var=$1; value=$2
+ if [ "$( grep -E "^$var(\s+DEFAULT|=)" .pam_environment )" ]; then
+ sed -r -i "s/^$var(\s+DEFAULT|=).*/$var\tDEFAULT=$value/"
.pam_environment
+ else
+ echo "$var\tDEFAULT=$value" >> .pam_environment
+ fi
}
But it must be
- echo -e "$var\tDEFAULT=$value" >> .pam_environment
+ echo -e "$var\tDEFAULT=$value" >> .pam_environment
- With this fix the syntax of the pam_environment is correct and will be
- working.
+ With this modification the syntax of the pam_environment is correct and
+ will be working with bash.
- I see this error in the packages for jammy and noble.
+ I see this behaviour in the packages for jammy and noble.
+
+ Is it possible to fix the usage of the shell?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2120948
Title:
Error in save-to-pam-env script
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/2120948/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs