- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- banner before login promt ? Always knowing !
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 07:41 AM
тАО01-16-2001 07:41 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 07:52 AM
тАО01-16-2001 07:52 AM
SolutionAnd if you modify the telnet entry in the /etc/inetd.conf file to read as follows, telnet users will get it too.
telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 08:28 AM
тАО01-16-2001 08:28 AM
Re: banner before login promt ? Always knowing !
Then run inetd -c to reread configuration.
See man inetd
telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 08:35 AM
тАО01-16-2001 08:35 AM
Re: banner before login promt ? Always knowing !
As for getting the other item you mentioned. You need to edit the users .profile and add somthing like this:
PS1='$HOSTNAME:$PWD >'
export PS1
Now that greater than sign can be anything you want, most folks like a $, but each to his own...
/rcw
...and it only took me about a dozen times to get in on this post...every other one was a SSI error..go figure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 08:46 AM
тАО01-16-2001 08:46 AM
Re: banner before login promt ? Always knowing !
HOSTNAME=standalone
PROMPT="$"
SMUL=""
RMUL=""
[[ -x /usr/bin/hostname ]] && HOSTNAME=$(/usr/bin/hostname)
[[ -x /usr/bin/tput ]] && SMUL=$(/usr/bin/tput smul)
[[ -x /usr/bin/tput ]] && RMUL=$(/usr/bin/tput rmul)
file=/usr/bin/id
if [ -x $file ] ;then
[[ $($file -un) = "root" ]] && PROMPT="#"
fi
PS1='${LOGNAME}@${HOSTNAME}:${SMUL}${PWD}${RMUL}
${PROMPT} '
you can put in /etc/profile to effect every user or have each user put it into their ~/.profile file for a per user implementation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 08:52 AM
тАО01-16-2001 08:52 AM
Re: banner before login promt ? Always knowing !
loginhost=`uname -n`
export PS1='$loginhost ${PWD##*/} $ '
Just having $PWD can display quite a long string, whereas PWD##*/ will only display the current directory name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 09:09 AM
тАО01-16-2001 09:09 AM
Re: banner before login promt ? Always knowing !
The following is my PS1 entry from my .shrc for root:
export PS1='[$HOST:$LOGNAME] ! $PWD
which makes my prompt look like:
[scrooge:root] 388 /home/wallek
#
Yes the # is supposed to be on the next line. The '!' in the export denotes the CR/LF. $PWD is always your current directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 09:13 AM
тАО01-16-2001 09:13 AM
Re: banner before login promt ? Always knowing !
export HOST=`uname -n`
export PS1='[$HOST:$LOGNAME] ! $PWD
# '
Yes it does span two lines. The # is on the second line.
It makes my prompt look like:
[scrooge:root] 390 /home/wallek
#
If my previous reply to this thread show up, ignore it. I didn't get everything correct in it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2001 09:37 AM
тАО01-16-2001 09:37 AM
Re: banner before login promt ? Always knowing !
working dir (pwd) at the curser editing the
/ect/profile like this
HOST="(`hostname |cut -d"." -f1`)"
if [ "$LOGNAME" = "root" ]; then
PROMPT="#"
else
PROMPT=">"
fi
PS1='${HOST} ${PWD}${PROMPT} '
PS2='${HOST} ${PWD}> '
export PS1 PS2
trap 1 2 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2001 06:42 AM
тАО01-17-2001 06:42 AM
Re: banner before login promt ? Always knowing !
I used to have three things:
1. banner hostname
2. PS1=....
3. /usr/games/fortune
That way people had a nice fortune cookie to read as they are logging in.