The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to get environment of a "fresh" login shell? Miikka Shell Programming and Scripting 6 10-04-2008 08:10 PM
script that can give login password for "ssh" without involving STDIN gydave Shell Programming and Scripting 2 08-03-2008 07:03 PM
ksh script as a login shell return "no controlling terminal" lramirev Shell Programming and Scripting 8 07-16-2008 01:31 AM
No utpmx entry: you must exec "login" from lowest level "shell" peterpan UNIX for Dummies Questions & Answers 0 01-18-2006 04:15 AM
do you believe X-application will "kill" the CDE and come back to login dialog chenhao_no1 High Level Programming 3 07-19-2002 08:58 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-17-2008
lifegeek lifegeek is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 28
I want to change login failure message, "login incorrect"

I want to change login failure message, "login incorrect"

deny user login for user id tom
sudo passwd -l tom

type username and type password on login prompt
and then it will display login failure message "login incorrect"
console
############
login: tom
password:
login incorrect
login:
############
I want to replace 'login incorrect' to 'contact your system administrator'

i'm sorry i am poor at english
thanks in advance

Last edited by lifegeek; 11-17-2008 at 06:04 AM..
  #2 (permalink)  
Old 11-17-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,569
In /etc/profile, put:
Code:
if [[ ${LOGNAME} = "tom"  ]]
then
  echo "${LOGNAME} is not allowed to login. Contact your system administrator"
  sleep 5
  exit 1
fi
  #3 (permalink)  
Old 11-17-2008
lifegeek lifegeek is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 28
life saver~
thank you!

i found another solution
Code:
# echo "contact your local administrator" >> /sbin/nologin
# usermod -s /sbin/nologin tom
Code:
login: tom
contact your local administrator
login:
allow tom to login
Code:
# usermod -s /bin/bash tom

Last edited by lifegeek; 11-18-2008 at 02:15 AM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0