Quote:
Originally Posted by pan64
I would say you misunderstood something. bash --login will start you a login shell, see the man page of bash.
login -bash will not work.
also see man page of login: login may be special to the shell and may not be invoked as a sub-process.
|
Hi Pan64, thanks for replying.
I tried bash --login, but it doesnt prompt me for any login or password entry and $0 doesnt return a login shell "-bash"
Code:
[alan@racnode1 ~]$ bash --login
[alan@racnode1 ~]$ echo $0
bash
[alan@racnode1 ~]$
When I do a su - user directly, it returned me a login shell.
Code:
[alan@racnode1 ~]$ su - alan
Password:
[alan@racnode1 ~]$ echo $0
-bash
[alan@racnode1 ~]$
Am I missing something ? How does the login process works (when a user 1st connnect to the terminal) ?
is "login" process really invoking "bash --login" or "bash" is invoking "--login" to let user login into a login shell ?
Regards,
Noob