Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-16-2017, 02:47 AM   #1
Registered: May 2006
Posts: 93

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


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
[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, 02:59 AM   #2
LQ Guru
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,085
Blog Entries: 3

Rep: Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665Reputation: 3665
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, 04:35 AM   #3
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 
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 04:41 AM. Reason: missing last deny line in access.conf


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration