LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-25-2019, 12:12 PM   #1
Latitude
Member
 
Registered: Mar 2009
Posts: 65

Rep: Reputation: 16
RHEL 7 - Active Directory Authentication without the "@domain"


I recently added a production RHEL 7 server to our active directory domain. In order to login using domain credentials via ssh, I have to type <username>@<domain> into putty. Is it possible to configure authentication so we don't have to write the "@<domain>" after the username, and only include the username?
 
Old 06-26-2019, 09:29 AM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by Latitude View Post
I recently added a production RHEL 7 server to our active directory domain. In order to login using domain credentials via ssh, I have to type <username>@<domain> into putty. Is it possible to configure authentication so we don't have to write the "@<domain>" after the username, and only include the username?
Congratulations; you got it to work!

But, one question; why did you not do this on a TEST server before production?

What method did you use (sssd or something else)?
 
Old 06-27-2019, 03:03 PM   #3
Latitude
Member
 
Registered: Mar 2009
Posts: 65

Original Poster
Rep: Reputation: 16
Thanks! I used realm to join the domain and sssd to manage authentication. I tested this in non-production before prior to migrating to prod but of course didn't realize it was an option to not require the domain name when logging in *until* my colleague requested it. I'm glad he did. I found out you can configure it using the steps below:

Edit the file /etc/sssd/sssd.conf and change the use_fully_qualified_names setting from True to False. The default setting is True:

Code:
use_fully_qualified_names = False
Then restart sssd:

Code:
$ sudo systemctl restart sssd.service
I verified this against my RHEL 7.6 machine and Active Directory Domain Services on Microsoft Window Server 2012

Pro tip:

add the line below to the /etc/sudoers file if you want Domain Admins group to be able to execute commands with sudo on the Linux server.

Code:
%domain\ admins ALL=(ALL) ALL
The backslash ( \ ) in %domain\ is needed as the escape character after the first word of the group name (domain admins) in order to preserve the literal value of the space character in group "domain admins" between "domain" and "admins". Once you add this line to your /etc/sudoers file, users added to the domain admins group of the domain can also run commands with sudo privilege on the Linux Servers.

Last edited by Latitude; 07-01-2019 at 07:53 AM.
 
  


Reply

Tags
red hat, red hat linux



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
how to join ubnutu system with active directory also login into active directory user mani25288 Linux - Server 2 07-10-2017 09:56 AM
Ubuntu 16.04 system Active directory integration with windows server 2012 forest domain ,i could nt login child domain users in ubnutu syste mani25288 Linux - Server 2 07-10-2017 09:56 AM
Active Directory authentication for ssh without "net ads join" (just with search acc) grayFalcon Linux - Server 2 05-23-2011 01:30 AM
PAM Active Directory user authentication for Samba shares in RHEL 4 rockfx01 Linux - Server 3 12-02-2008 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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