"su -s /bin/bash" on a system with setup-2.8.71-10.el7 where root login shell is /sbin/nologin and fails

Solution Unverified - Updated -

Issue

  • "su -s /bin/bash" on a system with setup-2.8.71-10.el7 where root login shell is /sbin/nologin and fails.
# getent passwd root
root:x:0:0:root:/root:/sbin/nologin
$ su -s /bin/bash
Password: 
su: using restricted shell /sbin/nologin
This account is currently not available.

Environment

  • Red Hat Enterprise Linux 7
  • setup-2.8.71-10.el7 or later one

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content