Wednesday, September 3, 2025
HomeSecurity & TestingSet Default Login Shell on SSSD for AD users using FreeIPA

Set Default Login Shell on SSSD for AD users using FreeIPA

.tdi_3.td-a-rec{text-align:center}.tdi_3 .td-element-style{z-index:-1}.tdi_3.td-a-rec-img{text-align:left}.tdi_3.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_3.td-a-rec-img{text-align:center}}

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.

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.

.tdi_2.td-a-rec{text-align:center}.tdi_2 .td-element-style{z-index:-1}.tdi_2.td-a-rec-img{text-align:left}.tdi_2.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_2.td-a-rec-img{text-align:center}}
$ sudo vim /etc/sssd/sssd.conf
.......
default_shell = /bin/bash
override_shell = /bin/bash

See screenshot below.

freeipa ad change shell

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([email protected]) gid=1426401131([email protected]) groups=1426401131([email protected]),1426400513(domain [email protected]),915800006(ad_users)

Try to ssh as AD user.

$ ssh ipauser\@mydomain.com@localhost
Password: 
Creating home directory for [email protected].
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:

.tdi_4.td-a-rec{text-align:center}.tdi_4 .td-element-style{z-index:-1}.tdi_4.td-a-rec-img{text-align:left}.tdi_4.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_4.td-a-rec-img{text-align:center}}
RELATED ARTICLES

Most Popular

Dominic
32260 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6625 POSTS0 COMMENTS
Nicole Veronica
11795 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11855 POSTS0 COMMENTS
Shaida Kate Naidoo
6746 POSTS0 COMMENTS
Ted Musemwa
7023 POSTS0 COMMENTS
Thapelo Manthata
6694 POSTS0 COMMENTS
Umr Jansen
6714 POSTS0 COMMENTS