1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:37:35 +00:00

su: Add the --login option

This option, often used with only a lonely dash, allows to "simulate a
login". For now, it just changes the current directory to the home of
the new user.
This commit is contained in:
Lucas CHOLLET 2022-06-10 21:09:38 +02:00 committed by Sam Atkins
parent 507cb411c2
commit 6900c4fe29
2 changed files with 23 additions and 7 deletions

View file

@ -5,7 +5,7 @@ su - switch to another user
## Synopsis
```sh
$ su <user>
$ su [-] <user>
```
## Description
@ -14,6 +14,10 @@ $ su <user>
When called with no user-specified, `su` defaults to switch to the *root* user. Need to enter the password if the user switch to has one.
## Options:
* `-`, `-l`, `--login`: Start the shell as it was a real login
## Arguments
* `user`: User to switch to (defaults to the user with UID 0)