Sample Header Ad - 728x90

Ubuntu doesn't translate /home/testuser to ~

0 votes
2 answers
78 views
In Ubuntu 22.04.3 LTS, if I log in with the credentials of the LDAP user testuser, in several different programs the path of the $HOME directory is not replaced by ~ (as instead it happens for local users). A couple of examples: 1) In bash, the value of PS1 is the default one: \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ but it appears as testuser@myhost:/home/testuser$ instead of testuser@myhost:~$ 2) In neomutt, in the left column where the mail directories are listed, their full path appears /home/testuser/Mail/mailbox1 instead of ~/Mail/mailbox1 However, in bash, $ echo $HOME /home/testuser so the env variable HOME is somewhat recognized. What could it be the problem? ---------- **Update** I am using sssd to manage the authentication of the LDAP users: $ grep passwd /etc/nsswitch.conf passwd: files systemd sss The entries of the LDAP user and of a local user look very similar: $ getent passwd testuser testuser:*:::Test User:/home/testuser/:/usr/bin/bash $ getent passwd localuser localuser:x:::,,,:/home/localuser:/bin/bash And $ echo $HOME /home/testuser/ matches the home directory specified in getent passwd testuser.
Asked by BowPark (5155 rep)
Jan 10, 2024, 02:44 PM
Last activity: Jan 17, 2024, 11:21 PM