LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2017, 01:47 AM   #1
Orangutanklaus
Member
 
Registered: May 2006
Posts: 93

Rep: Reputation: 15
sshd.conf - AllowUsers syntax for Domain Users?


Hello!

I've joined a Debian 8 server to a Windows domain. Nearly everything works as expected - even ssh login with domain authentication.

Nearly because I want to limit ssh access to one local user and only one specific domain user.

So I thought a AllowUsers entry in the sshd.conf file will do the job - fail...

I always get the messages:

PHP Code:
sshd[5400]: User myuser@mydomain.lan from myhost.mydomain.lan not allowed because not listed in AllowUsers
sshd
[5400]: input_userauth_requestinvalid user mydomain\\\\myuser [preauth]
sshd[5400]: debug1PAMinitializing for "mydomain\\myuser" 
My current entry is:

PHP Code:
UsersAllow mylocaluser "myuser@mydomain.lan" 
I've tried nearly any syntax (including sshd restart) I've found on the web but without success. Theres are also no other allow or deny entries in the conf file.

Any suggestions?
 
Old 08-16-2017, 01:59 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
It won't work that way. You'll probably have to go through PAM for that instead, at least if the original Kerberos is anything to go by. I've not had to touch PAM configuration in years, though, so that is just a pointer.
 
Old 08-16-2017, 03:35 AM   #3
Orangutanklaus
Member
 
Registered: May 2006
Posts: 93

Original Poster
Rep: Reputation: 15
K, I did some more research based on your suggestion.

I've enabled the following line in /etc/pam.d/sshd

PHP Code:
account  required     pam_access.so 
and also added the domain user in /etc/security/access.conf

PHP Code:
+ : myuser@mydomain.lan ALL
+ : mylocaluser ALL
- : ALL ALL 
Slightly different error message (here PAM) but same results regardless what syntax I use for the domain user:

PHP Code:
fatalAccess denied for user myuser@mydomain.lan by PAM account configuration [preauth
...and of course removed the AllowUsers line from sshd.conf

Last edited by Orangutanklaus; 08-16-2017 at 03:41 AM. Reason: missing last deny line in access.conf
 
  


Reply



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
DNS - resolv.conf with custom tld (top level domain) domain directive rubanek Linux - Networking 1 06-04-2013 12:11 PM
Samba4 domain not seeing imported users ,Groups and Machine Accounts from samba3 domain treedstang Linux - Server 0 01-06-2013 11:45 PM
domain users can't access samba shares on domain member server noahbeach Linux - Server 1 11-24-2010 05:16 AM
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
Starting sshd: /etc/init.d/sshd: line 113: /usr/sbin/sshd: Permission denied sumanc Linux - Server 5 03-28-2008 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:16 PM.

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