LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2017, 05:17 PM   #1
chtsalid
Member
 
Registered: Jan 2017
Posts: 67

Rep: Reputation: Disabled
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!
 
Old 01-26-2017, 07:50 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163
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?
 
1 members found this post helpful.
Old 01-27-2017, 01:39 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,603

Rep: Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361
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?
 
1 members found this post helpful.
Old 01-27-2017, 02:34 AM   #4
chtsalid
Member
 
Registered: Jan 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Hi,

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

[jake@rh3 ~]#

Regards,
Christos
 
Old 01-27-2017, 02:43 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,603

Rep: Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361
you need to set PS1 to configure it.
see man bash about it, or https://www.kirsle.net/wizards/ps1.html for example
 
1 members found this post helpful.
Old 01-27-2017, 03:12 AM   #6
chtsalid
Member
 
Registered: Jan 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
I have entered the

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

in the ~.bashrc in /root

is that correct?
 
Old 01-27-2017, 03:33 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,603

Rep: Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361
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.
 
1 members found this post helpful.
Old 01-27-2017, 03:41 AM   #8
chtsalid
Member
 
Registered: Jan 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-27-2017, 03:44 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,603

Rep: Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361
because that is another user (jake), not root, so you need to set PS1 in ~/.bashrc of that user.
 
1 members found this post helpful.
Old 01-27-2017, 03:56 AM   #10
chtsalid
Member
 
Registered: Jan 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Many thanks it works now!
 
Old 01-27-2017, 05:31 PM   #11
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163
What worked?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[LDAP] -Setup Ldap for user authentication based on time trung1490 Linux - Server 1 02-23-2016 01:53 PM
Using LDAP authentication in Apache, but not getting a password prompt slimjim Linux - Server 7 03-21-2012 06:21 AM
[SOLVED] LDAP authentication error [Can't contact LDAP server] from apache httpd jonathan_w_brown Linux - Server 6 12-28-2011 06:30 PM
Squid/SquidGuard/LDAP (lauch bash script on authentication) Pex Linux - Server 0 10-21-2011 10:06 AM
[SOLVED] Apache authentication: allow LDAP group OR user named guest, but not all LDAP users AlucardZero Linux - Server 1 05-25-2011 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration