[CentOS] Help with default shell

Thu Jun 24 09:53:44 UTC 2021
Stephen John Smoogen <smooge at gmail.com>

On Wed, 23 Jun 2021 at 09:13, Hooton, Gerard <g.hooton at ucc.ie> wrote:
>
> Hi all,
> I have a computer with CentOS 7.
> The users are authenticated using OpenLDAP.
> On LDAP the default shell is csh.
> When  ssh to login it works, i.e. $SHELL = /bin/csh
> Also, when using xrdp it works.
> However, a login from the  keyboard and screen attached computer we get $SHELL = /bin/bash
>

So my first thing I would try to do would be to see if `getent passwd
<username>` showed different configs when a person logged in different
ways. Aka
```
$ ssh foobaz
$ getent passwd ssmoogen
ssmoogen:x:14353:14353:Stephen Smoogen:/home/ssmoogen:/bin/csh
$ exit

login: ssmoogen
passwd:
$ getent passwd
ssmoogen:x:14353:14353:Stephen Smoogen:/home/ssmoogen:/bin/bash
$ exit
```

In either case, I think from going down the rabbithole of bugs/etc
that something in your system is using attribute mapping to force a
shell but only for console logins. The general way this is done is
sticking

map passwd loginShell "/bin/bash"
map passwd shell "/bin/bash"

Beyond that I do not have any openldap systems to confirm how this
would be done.

> Any help is welcome.
> Regards,
>
> Ger.
>
>
>
> --
>
> Gerard Hooton.
> Senior Technical Officer
> School of Engineering.
> University College Cork.
> College Road.
> Cork.
> Ireland.
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos



-- 
Stephen J Smoogen.
I've seen things you people wouldn't believe. Flame wars in
sci.astro.orion. I have seen SPAM filters overload because of Godwin's
Law. All those moments will be lost in time... like posts on  BBS...
time to reboot.