I have no idea what is the topic of my problem.
I have to change the user using su user
when accessing the server with ssh user@server
The initial terminal shows just >
without a user name (i.e., user@server >
) before the change user (i.e., su user
)
The process is so bothering me. Please note the reason, answer.
Thanks
id -un
show when you initially log in on the remote machine. What shell is being used and what doesecho "$-"
output? My thinking is that you've logged in as the correct user, but that one of the shell's initialization files (that sets the prompt) just isn't executed. – Kusalananda Jun 12 '20 at 07:29>
for some reason: perhaps an attempt to increase security by making the system more obscure? A need to satisfy some contract or security audit requirement to minimize the amount of information displayed? Personal preference? The only way to know the fundamental reason would be to ask the server administrator about it. – telcoM Jun 12 '20 at 07:36id -un
. And theecho "$-"
shows smi – wazz Jun 17 '20 at 00:57PS1
variable (the primary prompt) set in~/.bashrc
or in~/.bash_profile
on the remote system (assuming you're using thebash
shell)? – Kusalananda Jun 17 '20 at 08:23~/.bashrc
with the following:`if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$ ' fi unset color_prompt force_color_prompt
If this is an xterm set the title to user@host:dir
case "$TERM" in xterm|rxvt) PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1" ;; *) ;; esac `
– wazz Jun 17 '20 at 11:30