I have a client who has an install script that needs to run under
/bin/tcsh as the shell on their Active Directory Domain Joined RHEL7 Virtual Machine.
This install script will be run using a service account called,
serviceaccount. Now, this account is granted rights because of a group it's a member of
The end user logs into the VM,
sudo su serviceaccount and then runs the shell.
We have modified
loginShell to be set to
Now, the Unix admin team set
serviceaccount's profile to be
/bin/tcsh and it can be verified using the user's environmental settings. Somehow, the install script is finding
/bin/bash, and it seems totally random, but it pulls incorrectly more than 95% of the time.
I don't see any shell attributes in AD Groups, nor anything else close in the user attributes, besides the
I've also verified it's set correctly in every Domain Controller in the environment.
getent passwd serviceaccount serviceaccount:*:123456789:123456789:serviceaccount:/home/serviceaccount:/bin/bash
(As another test, we stood up a new VM that this account has never been logged into and
getent still shows