Learn how to – Set Default Login Shell on SSSD for AD users using FreeIPA.
The IPA Identity Management server provides bidirectional user identity and password synchronization with Microsoft Active Directory. But after the configuration of IPA and Active Directory, the default shell for users is /bin/sh. This guide will discuss how you can change the default shell for AD trust users on FreeIPA client so that all users can enjoy better shell environments such as bash and zsh.
I assume you have installed and configured both FreeIPA server and Client. Our guides below should be helpful.
- Installing FreeIPA server on Ubuntu / CentOS 7 / RHEL 8 / Rocky Linux 8
- Configuring FreeIPA Client on CentOS 7 / Ubuntu/Debian / RHEL/CentOS 8
Change default Shell on SSSD
The System Security Services Daemon (SSSD) is a system service to access remote directories and authentication mechanisms. It connects a local system (an SSSD client) to an external back-end system (a domain). We will edit the SSSD client configuration file /etc/sssd/sssd.conf and define default shell under DOMAIN section.
$ sudo vim /etc/sssd/sssd.conf
.......
default_shell = /bin/bash
override_shell = /bin/bash
See screenshot below.
After making the change, remove sssd cache and restart sssd service.
sudo rm -rf /var/lib/sss/db/*
sudo systemctl restart sssd
Check user on AD.
$ id ADSRV01\ipauser
uid=1426401131(ipauser@mydomain.com) gid=1426401131(ipauser@mydomain.com) groups=1426401131(ipauser@mydomain.com),1426400513(domain users@mydomain.com),915800006(ad_users)
Try to ssh as AD user.
$ ssh ipauser@mydomain.com@localhost
Password:
Creating home directory for ipauser@mydomain.net.
Last login: Fri Jun 21 16:41:27 2019 from localhost
Check user login shell.
$ echo $SHELL
/bin/bash
You now have /bin/bash as default shell for all your AD users accessing Linux services via SSH. Find more guides below on FreeIPA:
- Run FreeIPA Server in Docker / Podman Containers
- Manage Users and Groups in FreeIPA using CLI
- How To Configure Jenkins FreeIPA LDAP Authentication
- Configure GitLab FreeIPA LDAP Authentication
- Secure FreeIPA Server With Let’s Encrypt SSL Certificate
Leave a Reply
You must be logged in to post a comment.