Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Login annoyance [SOLVED]

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
BFGod
n00b
n00b
Posts: 5
Joined: Fri Nov 24, 2006 10:19 pm

Login annoyance [SOLVED]

  • Quote

Post by BFGod » Fri Nov 24, 2006 10:34 pm

Hello.

First of all, greetings to entire gentoo community from a newcomer.

Ok, on to the questions. Could someone tell me how can one change the way the login is displayed, for example:

from:

Code: Select all

bfgod@gentoobox ~ $ ssh gentoobox
bfgod@gentoobox's password:
to:

Code: Select all

bfgod@gentoobox ~ $ ssh gentoobox
password:
Is there a way to NOT display username@computername before the password, and how can I go about changing that?

The second question would be how can I change /etc/issue and /etc/motd usage?

I have created /etc/motd but commenting out this line in /etc/login.defs. Also, I've uncommented /etc/issue line so that issue is displayed instead of motd, but motd is still displayed.

The relevant part looks like this:

Code: Select all

#MOTD_FILE      /etc/motd
ISSUE_FILE      /etc/issue
Am I working on a wrong config file, or do I need to execute some command or restart a service after modifying /etc/login.defs?

Thanks in advanced.
Last edited by BFGod on Sat Dec 09, 2006 1:34 pm, edited 1 time in total.
Top
papal_authority
Veteran
Veteran
User avatar
Posts: 1823
Joined: Wed Mar 31, 2004 4:07 am
Location: Canada

  • Quote

Post by papal_authority » Sat Nov 25, 2006 11:06 pm

I am not aware of any way of changing the SSH password prompt short of hacking the source. Can you use key based authentication if you dislike the prompt?
The free market gave me gonorrhea.
Top
Kaste
Guru
Guru
User avatar
Posts: 546
Joined: Wed Dec 21, 2005 7:37 am
Location: /home Sweet /home

  • Quote

Post by Kaste » Sun Nov 26, 2006 10:07 am

I don't think that is what s/he wants.
You need to specify a way for ssh to do something with the login shell it uses and then you need this:
http://gentoo-wiki.com/TIP_Prompt_Magic

But I'm fairly confident fiddling this to work will take a few hours.

I don't know about your other problem, but I think the solution is somehwere in man agetty
Top
BFGod
n00b
n00b
Posts: 5
Joined: Fri Nov 24, 2006 10:19 pm

  • Quote

Post by BFGod » Sun Nov 26, 2006 12:32 pm

Thank you for your answers. I'll probably skip your suggestion, because from my experience that "few hours" easily stretches to few days :)

And I thing I can answer myself the second question. I am logging on the machine over ssh, and displaying of motd over ssh obviously isn't controlled by /etc/login.defs but with /etc/ssh/sshd_config and there i could enable/disable displaying of the motd without problem. Also I didn't know that /etc/issue is only displayed locally, so turning it on/off offcourse didn't change anything when connecting over ssh.

I won't put [SOLVED] yet in the topic, because maybe someone will have a simpler solution to the first question, and I'm pretty sure it will be someting simple, because I talked to one person on #gentoo and he doesn't get that username@machine when ssh-ing, and he says it always worked like that for him.
Top
SirYes
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Sun Jan 15, 2006 10:14 am
Location: Lodz, Poland
Contact:
Contact SirYes
Website

  • Quote

Post by SirYes » Sun Nov 26, 2006 1:04 pm

BFGod wrote:I talked to one person on #gentoo and he doesn't get that username@machine when ssh-ing, and he says it always worked like that for him.
Same experience here: I haven't seen "user@host's password" for a long time, even though I log to servers with different Linux distributions.
My blog: In search for ultimate programming language
Top
converter
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Tue Dec 24, 2002 11:19 pm

  • Quote

Post by converter » Sun Nov 26, 2006 2:20 pm

Why is the inclusion of the user name and host name in the ssh password prompt a problem for you?
converter
Top
BFGod
n00b
n00b
Posts: 5
Joined: Fri Nov 24, 2006 10:19 pm

  • Quote

Post by BFGod » Sun Nov 26, 2006 2:41 pm

converter wrote:Why is the inclusion of the user name and host name in the ssh password prompt a problem for you?
Well, it isn't a problem at all, it's an annoyance. It's just my curiosity to find out how things, even the small and/or insignificant thing like this work.

It's like this, on the debian machine that I have ssh access to, when logging in I get:

Code: Select all

username:
password:

MOTD

mail notification

last login
and on the server on which I installed gentoo, it's like this:

Code: Select all

username:
username@hostname's password:
last login

motd
and I just wanted to know if there is a (simple) way to change stuff like that, just out of curiosity, nothing more.
Top
converter
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Tue Dec 24, 2002 11:19 pm

  • Quote

Post by converter » Mon Nov 27, 2006 12:19 am

Fair enough. Curiosity is a good thing. :)

Try running sshd in debug mode, listening to a special port (so you can run it independently of your regular sshd service) and run ssh with the -v switch. If you're watching the debug output of both the daemon and client, you should be able to figure out which authentication mechanism is printing the <user>@<hostname> prompt. My guess would be PAM.
converter
Top
BFGod
n00b
n00b
Posts: 5
Joined: Fri Nov 24, 2006 10:19 pm

  • Quote

Post by BFGod » Tue Nov 28, 2006 7:24 pm

Nop, it doesn't seem to be PAM.

This is what I get:

Code: Select all

sshd[31718]: debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
sshd[31536]: debug1: Forked child 31718.
sshd[31718]: debug1: inetd sockets after dupping: 3, 3
sshd[31718]: Connection from xx.xx.xx.xx port 1997
sshd[31718]: debug1: Client protocol version 2.0; client software version PuTTY-Release-0.53b
sshd[31718]: debug1: no match: PuTTY-Release-0.53b
sshd[31718]: debug1: Enabling compatibility mode for protocol 2.0
sshd[31718]: debug1: Local version string SSH-2.0-OpenSSH_4.4
sshd[31718]: Failed none for bfgod from xx.xx.xx.xx port 1997 ssh2
sshd[31718]: Accepted password for bfgod from xx.xx.xx.xx port 1997 ssh2
sshd[31718]: debug1: monitor_child_preauth: bfgod has been authenticated by privileged process
sshd[31721]: debug1: permanently_set_uid: 1000/1000
sshd[31721]: debug1: Entering interactive session for SSH2.
sshd[31721]: debug1: server_init_dispatch_20
sshd[31721]: debug1: server_input_channel_open: ctype session rchan 256 win 16384 max 16384
sshd[31721]: debug1: input_session_request
sshd[31721]: debug1: channel 0: new [server-session]
sshd[31721]: debug1: session_new: init
sshd[31721]: debug1: session_new: session 0
sshd[31721]: debug1: session_open: channel 0
sshd[31721]: debug1: session_open: session 0: link with channel 0
sshd[31721]: debug1: server_input_channel_open: confirm session
sshd[31721]: debug1: server_input_channel_req: channel 0 request pty-req reply 1
sshd[31721]: debug1: session_by_channel: session 0 channel 0
sshd[31721]: debug1: session_input_channel_req: session 0 req pty-req
sshd[31721]: debug1: Allocating pty.
sshd[31718]: debug1: session_new: init
sshd[31718]: debug1: session_new: session 0
sshd[31721]: debug1: session_pty_req: session 0 alloc /dev/pts/5
sshd[31721]: debug1: server_input_channel_req: channel 0 request shell reply 1
sshd[31721]: debug1: session_by_channel: session 0 channel 0
sshd[31721]: debug1: session_input_channel_req: session 0 req shell
sshd[31722]: debug1: Setting controlling tty using TIOCSCTTY.
Top
BFGod
n00b
n00b
Posts: 5
Joined: Fri Nov 24, 2006 10:19 pm

  • Quote

Post by BFGod » Tue Nov 28, 2006 7:54 pm

Hey converter, thanks for mentioning PAM, I recompiled openssh with pam, set "UsePAM yes" in sshd_config and voila, no more username@hostname :)

I just need to figure out how to put last login *after* motd, but this is pretty much solved. I'll just keep it without [SOLVED] tag for two or three more days, maybe someone will suggest something about this last login after motd.
Top
Post Reply

10 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic