Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-15-2016, 10:58 AM   #1
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Specifying active directory users who can log into a SSH server

Hello --

I have set up a Samba server in our Active Directory environment that currently allows a particular user the ability to login using his domain user account from either the console or from an SSH connection. However, this ability is not available for any other user.

We are in the process of creating an Active Directory group that will contain an existing Active Directory group that will be granted access to the Samba server. Part of this project involves modifying the ssd_config file on the server.

To that end I was planning on adding the following line to the configuration file:

AllowUsers <username>
1. Is this the correct syntax? For example is it AllowUsers <username>, <username> or AllowUsers <GroupName>

2. Can I utilze group names as opposed to indvidual user names?

Old 06-15-2016, 01:45 PM   #2
Registered: Nov 2010
Location: Minneapolis, MN
Distribution: Ubuntu, Red Hat, Mint
Posts: 172

Rep: Reputation: 56
You could use

AllowGroups group1 group2 group3 ...
Otherwise it's

AllowUsers user1 user2 user3 ...
See also
Old 06-15-2016, 01:46 PM   #3
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95

I think you are in the correct path.
I can try to guide you, but I think that you just need to read man 5 sshd_config.
It has everything you need, and I doubt that I would be able to give a better explanation.
Pay careful attention to evaluation order of those directives that is: DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.


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
RHEL 7, realmd, and joining Active Directory -- can't log into server griffey Red Hat 6 01-02-2016 04:16 AM
Samba and Active Directory: New Users unable to access shares, old users are fine Jelorian Linux - General 2 05-08-2014 06:35 PM
How do I get active directory to add users to linux server baronobeefdip Linux - Server 0 03-30-2013 06:44 PM
Set Active Directory users permission for SSH adampar Linux - Server 7 09-21-2011 12:28 PM
Non-root users can log in to SSH but not read Home Directory? Bizanshee Linux - Software 1 09-18-2002 07:01 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:26 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