LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-19-2011, 03:28 AM   #1
ndaka123488
Member
 
Registered: Aug 2011
Posts: 63

Rep: Reputation: Disabled
displya jane@localhost instead of bash$


Hi Guys

I have installed Samba on my server and now trying to connect
to the server via Putty.

When I log on a user it gives this prompt

login as: jane
jnangolo@10.109.216.16's password:

-bash-3.2$



I want it to display this:

jane@localhost$

I dnt want it to log in to bash.

root@localhost.......it shud do the same for users.

Help
 
Old 12-19-2011, 04:01 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Ok, first up, putty doesnt connect to samba.

Second, you do want to log in to bash, bash is the shell (Bourne Again SHell). That makes up the commands you enter, and how you enter them.

Thirdly, what you are talking changing, is the prompt variable PS1. You can display your prompt variable, but it wont make an awful lot of sense. This is mine, a basic example for a normal user.
Code:
 ~ $ echo $PS1
\[\033[1;34m\]\w\[\033[0m\] \[\033[1;32m\]$ \[\033[0m\]
This is my root user prompt, that shows the hostname
Code:
fukawi1 ~ # echo $PS1
\[\033[0;31m\]\h\[\033[0m\] \[\033[1;34m\]\w\[\033[0m\] \[\033[0;31m\]# \[\033[0m\]
Which is set in your ~/.bashrc, If you want to use the same prompt that root has (not advisable as the "#" indicates the root user, and a "$" indicates a normal user) you can copy the PS1 prompt from your roots bashrc.
Code:
cp ~/.bashrc ~username/ && chown username:username ~username/.bashrc
If you look online you will find examples on how to format your own prompt as you like it.

Last edited by fukawi1; 12-19-2011 at 04:06 AM.
 
  


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
LXer: Meet Jane Silber The New CEO of Canonical Ubuntu Linux LXer Syndicated Linux News 0 03-04-2010 06:21 PM
Fedora Core 4, source compile kernel 2.6 (jane) fr0zen Fedora 2 11-08-2005 06:45 PM
Terminal : user@localhost => bash-2.05a$ storm Linux - Newbie 3 03-09-2003 05:22 PM
Apache Help - Dick and Jane Style phar1944 Linux - Networking 2 01-25-2003 03:51 PM
bash-2.04#? what happened to root@localhost gummyworms Linux - General 2 07-12-2001 10:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:34 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
Open Source Consulting | Domain Registration