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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-26-2017, 04:17 PM
|
#1
|
Member
Registered: Jan 2017
Posts: 69
Rep: 
|
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!
|
|
|
01-26-2017, 06:50 PM
|
#2
|
LQ Guru
Registered: Dec 2011
Distribution: Slackware, Debian 12, Devuan & MX Linux
Posts: 9,528
|
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.
|
01-27-2017, 12:39 AM
|
#3
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,189
|
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.
|
01-27-2017, 01:34 AM
|
#4
|
Member
Registered: Jan 2017
Posts: 69
Original Poster
Rep: 
|
Hi,
thank you for your replies! I was expecting to see something like this
[jake@rh3 ~]#
Regards,
Christos
|
|
|
01-27-2017, 01:43 AM
|
#5
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,189
|
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.
|
01-27-2017, 02:12 AM
|
#6
|
Member
Registered: Jan 2017
Posts: 69
Original Poster
Rep: 
|
I have entered the
export PS1="[\u@\h \W]\\$ "
in the ~.bashrc in /root
is that correct?
|
|
|
01-27-2017, 02:33 AM
|
#7
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,189
|
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.
|
01-27-2017, 02:41 AM
|
#8
|
Member
Registered: Jan 2017
Posts: 69
Original Poster
Rep: 
|
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.
|
|
|
01-27-2017, 02:44 AM
|
#9
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,189
|
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.
|
01-27-2017, 02:56 AM
|
#10
|
Member
Registered: Jan 2017
Posts: 69
Original Poster
Rep: 
|
Many thanks it works now!
|
|
|
01-27-2017, 04:31 PM
|
#11
|
LQ Guru
Registered: Dec 2011
Distribution: Slackware, Debian 12, Devuan & MX Linux
Posts: 9,528
|
What worked?
|
|
|
All times are GMT -5. The time now is 06:45 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|