LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-31-2019, 11:54 AM   #1
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Rep: Reputation: Disabled
First time SSH login not asking for password and logging in and creating home directories.


Subsequent attempts for user are working normally and prompting for authentication. Password-less isn't being used. This only happens the first time the user tries to login to the machine. These are CentOS7 VM's running on esxi 6.7 hosts


Code:
Subsystem       sftp    /usr/share/centrifydc/libexec/sftp-server
Protocol 2
ChallengeResponseAuthentication yes
Banner /etc/issue
GSSAPIKeyExchange yes
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
PrintMotd no
UsePAM yes
XAuthLocation /usr/bin/xauth
X11Forwarding yes
PermitRootLogin yes
AllowUsers user.name user.name user.name user.name user.name

Last edited by witchkinkofangmar; 05-31-2019 at 11:55 AM.
 
Old 06-01-2019, 12:50 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Can you restate your question? What precisely happens at first login (including error or other messages)? By default, when you add a user on Centos, $HOME is created as well; I have never heard of ssh creating home directories.

Is the code you are sharing the complete sshd_config file?

Have you tried the -vvv option on the ssh client and the server?
 
Old 06-03-2019, 09:11 AM   #3
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Original Poster
Rep: Reputation: Disabled
At first login, the user isn't prompted for a password and gets in, no error messages. On second attempt, they are prompted for a password and have to log in with password, normal behavior. Home dir created with centrify pam.homedir.create for Active directory.

That is all of sshd_config that isn't commented out. I can't recreate this and have spun up VMs with a test user in the same OU to try. This is straight from a user's mouth. Not the kind of user to make something like this up.
 
Old 06-03-2019, 09:42 AM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
In an out-of-the-box sshd_config on CentOS 7 the commented out settings are the defaults.
(those with #Something -- no space after the # -- the lines with "# comment" are actual comments)
So, those need to be looked at as well.

That said, I, too, am stumped. This user has this happen every time?
 
Old 06-03-2019, 09:57 AM   #5
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Original Poster
Rep: Reputation: Disabled
This happens for every new VM from a template that gets deployed. These VMs only have a few users and he's the only one who has mentioned it.

Code:
 #	$OpenBSD: sshd_config,v 1.102 2018/02/16 02:32:40 djm Exp $
# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/share/centrifydc/bin:/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/centrifydc/ssh/ssh_host_rsa_key
#HostKey /etc/centrifydc/ssh/ssh_host_ecdsa_key
#HostKey /etc/centrifydc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
#AuthorizedKeysFile	.ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/centrifydc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication no
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck no
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
#PAMCleanupCredentials yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no 
#ChrootDirectory none
#VersionAddendum none
# If configured then check whether the specific ssh-rights is allowed
# else ssh-rights check will be skipped
#ServiceAuthLocation /usr/share/centrifydc/libexec/dzsshchk
# no default banner path
#Banner none
# override default of no subsystems
# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	PermitTTY no
#	ForceCommand cvs server
# Configuration for Centrify DirectControl:

Subsystem       sftp    /usr/share/centrifydc/libexec/sftp-server
Protocol 2
ChallengeResponseAuthentication yes
Banner /etc/issue
GSSAPIKeyExchange yes
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
PrintMotd no
UsePAM yes
XAuthLocation /usr/bin/xauth
X11Forwarding yes
PermitRootLogin yes
AllowUsers user.name user.name user.name user.name user.name

Last edited by witchkinkofangmar; 06-03-2019 at 10:04 AM.
 
  


Reply

Tags
centos7, esxi, sshd, vmware



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
[SOLVED] NFS-mounted $HOME directories does not work on local graphical login, but works on ssh/tty someshpr Linux - Newbie 18 08-23-2017 05:23 AM
just installed debian for first time from disc now asking for login and password What do i use? murglejr Linux - Newbie 5 11-13-2016 04:19 PM
SU command not asking for password or integrate password in php code iris2gud Linux - Newbie 1 09-13-2013 05:59 AM
local host asking for password, not my password shredi Ubuntu 3 12-05-2010 09:43 PM
[CentOS + LDAP] Create home directories on the first login WojtekO Linux - Server 1 05-27-2010 02:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

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