Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password prompt 1

Status
Not open for further replies.

Panda

Technical User
Jan 19, 2001
25
MY
Is there anyway to change the password prompt on AIX? The normal telnet prompt is :
login: user1
user1's Password:

Can we change the password prompt from "user1's Password" to just "Password"?

Appreciate any pointers.
S.L.
 
Not sure how much of it is definable...
It is all tied to /etc/environment, and login.cfg....and
The /etc/security/login.cfg file is an ASCII file that contains stanzas of configuration information for login and user authentication. Each stanza has a name, followed by a : (colon), that defines its purpose. Attributes are in the form Attribute=Value. Each attribute ends with a new-line character, and each stanza ends with an additional new-line character.

/dev/tty0:
sak_enabled = true
herald = "login to tty0:"

port:
sak_enabled = false
herald = "login:"
* comma-seperated pathnames
aliases =
================.


Port stanzas define the login characteristics of ports and are named with the full path name of the port. Each port should have its own separate stanza. Each stanza has the following attributes:

herald Defines the login message printed when the getty process opens the port. The default herald is the login prompt. The value is a character string.
herald2 Defines the login message printed after a failed login attempt. The default herald is the login prompt. The value is a character string.
----------------------

check .env
.env File
A fourth file that the operating system uses at login time is the .env file, if your .profile has the following line: export ENV=$HOME/.env

The .env file enables you to customize your individual working environment variables. Because the .env file is hidden, use the li -a command to list it. The .env file contains the individual user environment variables that override the variables set in the /etc/environment file. You can tailor your environment variables as desired by modifying your .env file. The following example shows a typical .env file:

export myid=`id | sed -n -e 's/).*$//' -e 's/^.*(//p'` bold=`tput smso` norm=`tput rmso`
#set prompt: login & system name (reverse video) & path (normal)
if [ $myid = root ]
then typeset -x PSCH='${bold}#:${norm}\${PWD}> '
PS1="${bold}#:${norm}\${PWD}> "
else typeset -x PSCH='>'
PS1="${bold}$LOGNAME@$UNAME:${norm}\${PWD}> "
PS2=">"
PS3="#?"
fi
export PS1 PS2 PS3
#setup my command aliases
alias ls="/bin/ls -CF" d="/bin/ls -Fal | pg" rm="/bin/rm -i" up="cd .."
Note: Your shell uses three prompt variables:

PS1 Prompt used as the normal system prompt.
PS2 Prompt used when the shell expects more input.
PS3 Prompt used when you have root authority.

Sorry...but hope it helps #-)
 
The /etc/security/login.cfg file can change your username prompt. But, to change the password prompt itself, I think you need to modify/replace the login command.
 
The herald in login.cfg has a character limit on it.

A common use of the herald is to put some 30 \n 's in it, to scroll the console to prevent the next person from seeing what was happening on there last.

:)

As for the default response from login, I am not sure I'm afraid.

Shane
 
Why wanna you get ride of the john's password: prompt? It is there because if you set John user like this:
[tt]
john:
auth1 = SYSTEM, manager;SYSTEM

manager:
auth1 = SYSTEM
[tt]
at [tt]/etc/security/user[/tt] file, when [tt]john[/tt] user tries to log on the AIX auth system will say:
[tt]

Welcome to AIX blah blah blah
Login: john
[red]john's[/red] password: ******
[red]manager's[/red] password: *********
[/tt]

Then, we need a clue of what is AIX asking for!
I hope it works...
Unix was made by and for smart people.
 
Aix4.3

is there a way to change password policy for all users at once? I can cut and paste /etc/sercurity/user hopefully there is a easier way

thanks!
 
Yes you can change the prompt to just "Password" as of 5.2. Here is a snippet I got from somewhere. I think off the ibm web site.

The following example shows the result of changing the system-wide password prompt to Password:.
# chsec -f /etc/security/login.cfg -s default -a pwdprompt="Password:"

telnet (server1)

AIX Version 5
(C) Copyrights by IBM and by others 1982, 2000.
login: root
Password:

There are more examples if you need them. Such as not echoing the username but replacing it with ******'s.

If I can relocate the web page I will post the link for you.

Kirk
 
You can also change the password prompt by modifying Set 1, Message 2 of the tsm message catalog (tsm.cat).

See the documentation for "dspcat" and "gencat" to change messages in catalogs.

Hint: backup, backup, backup, and keep a record of your changes so you can reapply them at upgrade time.


Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top