0

I am trying to do linux from scratch. I was able to create the user to manage everything (named lfs) and I was able to login using this command. I then powercycled my computer and I am no longer able to switch to that user. If I enter su - lfs in my terminal I get the output [1]+ Stopped su - lfs after correctly entering the user password. Any ideas of how to fix this? Thanks.

1 Answers1

0

Somehow a SIGSTOP signal is sent to the su process. The interesting part is that only root processes are capable of sending signals to su. In other words: It cannot be the shell which is started by su. At least not directly; would have to be some sudo command or the like.

You can so this: Before you run su - lfs you run echo $$ in order to get the PID of the shell. In a different terminal you then run:

strace -f -tt -p $PID -o shell.strace

Then you run su - lfs. After su has been stopped, you abort strace with Ctrl-C and have a look at the file shell.strace. It should contain lines like

[pid 23558] --- SIGSTOP {si_signo=SIGSTOP, si_code=SI_USER, si_pid=23560, si_uid=0} ---
[pid 23558] --- stopped by SIGSTOP ---

That gives you the PID of the process that sent the signal.

Hauke Laging
  • 5,285
  • 2
  • 24
  • 40