When we enable Linux to use sssd for LDAP all the prompts will append the domain suffix.

This is what I mean:

1

As we can see we have prepend to the hostname of our machine, the full DN of the user we logged in with. username@domain.ldap in this case.

If we want to override this behavior and let only the username in both, the terminal prompt and the terminal window, we have to alter the .bashrc file for the user.

We have to look for the PS1 variables and change them. Here we have the before variable:

PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$

And the after:

PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]${USER%@*}@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$

As we can see we changed \u substitution string for the username to ${USER%@*}. This will override the shown result omitting the domain part.

Here is what we get now:

2

Quite handy if our machine belongs only to one domain as in my case.