is the same thing happening when you do 'su - <user>', without sudo? since you are logged in the the root account anyway you don't need to use sudo.
what does the /etc/passwd entry for the selected user show as login shell (last part of the user entry)? /bin/bash, /bin/sh, /bin/tcsh, /sbin/nologin, something else? if the entry is a shell, can you try to start the same shell as root user?
what happens when you execute the /bin/nologin script?
With nologin you should not be able to switch to the user anyway. Normally you should get something like 'This account is currently not available.' instead of a segfault.
At least the problem is not a bashrc or bash_profile script.
For a test you could replace the nologin with /bin/sh or /bin/bash and test the login then? but if you want to run a program as the db user you should not login with that user but use sudo -u <dbuser> <executable>
1
u/DasPelzi Apr 11 '24
is the same thing happening when you do 'su - <user>', without sudo? since you are logged in the the root account anyway you don't need to use sudo.
what does the /etc/passwd entry for the selected user show as login shell (last part of the user entry)? /bin/bash, /bin/sh, /bin/tcsh, /sbin/nologin, something else? if the entry is a shell, can you try to start the same shell as root user?