LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 04:17 PM   #1
chtsalid
Member
 
Registered: Jan 2017
Posts: 69

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, 06:50 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
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, 12:39 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 01:34 AM   #4
chtsalid
Member
 
Registered: Jan 2017
Posts: 69

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, 01:43 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 02:12 AM   #6
chtsalid
Member
 
Registered: Jan 2017
Posts: 69

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, 02:33 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 02:41 AM   #8
chtsalid
Member
 
Registered: Jan 2017
Posts: 69

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, 02:44 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 02:56 AM   #10
chtsalid
Member
 
Registered: Jan 2017
Posts: 69

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

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
What worked?
 
  


Reply



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 12:53 PM
Using LDAP authentication in Apache, but not getting a password prompt slimjim Linux - Server 7 03-21-2012 05:21 AM
[SOLVED] LDAP authentication error [Can't contact LDAP server] from apache httpd jonathan_w_brown Linux - Server 6 12-28-2011 05:30 PM
Squid/SquidGuard/LDAP (lauch bash script on authentication) Pex Linux - Server 0 10-21-2011 09:06 AM
[SOLVED] Apache authentication: allow LDAP group OR user named guest, but not all LDAP users AlucardZero Linux - Server 1 05-25-2011 03:21 PM

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

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

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
Open Source Consulting | Domain Registration