LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash prompt after ldap authentication (https://www.linuxquestions.org/questions/linux-newbie-8/bash-prompt-after-ldap-authentication-4175598326/)

chtsalid 01-26-2017 04:17 PM

bash prompt after ldap authentication
 
Hi,

could someone help me with the following:

why after user is authenticated by ldap server, i see the
bash prompt?

How could I fix this?

[root@rh1 ~]# ssh jake@192.168.122.194

jake@192.168.122.194's password:
-bash-4.2$

Many thanks!

Ztcoracat 01-26-2017 06:50 PM

After you run any command in the command-line terminal it's normal to see the bash prompt.
Just like in my example when I queried the system for my network card.

Code:

bash-4.3# lspci | grep -i network
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8192CE PCIe Wireless Network Adapter (rev 01)
bash-4.3#

What distribution are you running?

pan64 01-27-2017 12:39 AM

what do you expect (to happen)? with ssh you have just logged into 192.168.122.194 and have got a prompt. What do you want to achieve?

chtsalid 01-27-2017 01:34 AM

Hi,

thank you for your replies! I was expecting to see something like this

[jake@rh3 ~]#

Regards,
Christos

pan64 01-27-2017 01:43 AM

you need to set PS1 to configure it.
see man bash about it, or https://www.kirsle.net/wizards/ps1.html for example

chtsalid 01-27-2017 02:12 AM

I have entered the

export PS1="[\u@\h \W]\\$ "

in the ~.bashrc in /root

is that correct?

pan64 01-27-2017 02:33 AM

syntactically correct, although double \ is not required.
usually PS1 of root contains # and user's PS1 contains $, but obviously you can use what you set.

chtsalid 01-27-2017 02:41 AM

it doesn't work for me, I copied paste it and then access it by ssh jake@192.168.122.194
but result is the same.

pan64 01-27-2017 02:44 AM

because that is another user (jake), not root, so you need to set PS1 in ~/.bashrc of that user.

chtsalid 01-27-2017 02:56 AM

Many thanks it works now!

Ztcoracat 01-27-2017 04:31 PM

What worked?


All times are GMT -5. The time now is 01:23 AM.