0

0

I am trying to configure a custom prompt for RHEL 8 users. It works very nice when the users have local home directories.

However, I'm mounting home directories via pam_mount (nfs4). When ssh'ing to the machine, the prompt I made displays fine. But when opening a terminal in Gnome, the bash is the default bash4.4$.

I've tried to setup these on /etc/profile, adding a file to /etc/profile.d, and also to /etc/bashrc, to no avail.

EDIT: Just to make things clear: I do understand that ssh'ing x opening a terminal will have prompts defined on different places. My issue here is that I got to define a prompt that works when I open a terminal on Gnome (and when ssh'ing the machine), but that prompt doesn't show up as defined when the home directory is mounted from a remote server (although it still works when ssh'ing the machine).

Any idea on how to do it?

Best,

Francis

  • What exactly did you do? – Michael Hampton Nov 24 '20 at 00:09
  • @MichaelHampton I use pam_mount to get the home directory mounted on /home/username. So if I open a terminal on Gnome with a local user (without pam_mount), the prompt I define on /etc/profile is respected. But if I use pam_mount on /etc/pam.d/password-auth, so when the same terminal is started on Gnome, I don't get my custom prompt. None of the folders - neither the remote nor the local - has a .bashrc file. – francisaugusto Nov 24 '20 at 08:14
  • Exactly what shell code did you write? – Michael Hampton Nov 24 '20 at 11:28
  • I added `export PS1="[\u@\h:\l \W]\\$ "` to bash.rc under /etc/profile.d and also to /etc/bashrc. – francisaugusto Nov 24 '20 at 11:36

0 Answers0