Basically for this Jenkins user jenkins
bash was not configured.
jenkins:x:496:492:Jenkins Continuous Build server:/var/lib/jenkins:/bin/false
So we need to set the bash for this user and that resolved the issue. I used the following command:
sudo usermod -s /bin/bash jenkins
See below:
jenkins:x:496:492:Jenkins Continuous Build server:/var/lib/jenkins:/bin/bash
And now I can perform su and can use bash.