diff options
| author | srdusr <[email protected]> | 2023-06-02 10:18:40 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2023-06-02 10:18:40 +0200 |
| commit | ac52a299d25ff680f36fa3bd1ac2167c08e4aec8 (patch) | |
| tree | 0cc6fd59f00a6c3527c184d53cb59f480e89fc44 | |
| parent | 19652a09469458894eea656efd47271011e4a5d1 (diff) | |
| download | notes-ac52a299d25ff680f36fa3bd1ac2167c08e4aec8.tar.gz notes-ac52a299d25ff680f36fa3bd1ac2167c08e4aec8.zip | |
Info on creating a non-root user
| -rw-r--r-- | cheatsheets/termux.md | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/cheatsheets/termux.md b/cheatsheets/termux.md index 3d9b111..bd052ac 100644 --- a/cheatsheets/termux.md +++ b/cheatsheets/termux.md @@ -1,14 +1,28 @@ - Change password of root `# passwd` -- -`# pacman -S sudo vim visudo` - -- -`# passwd <username>` - - Install common base tools -`# pacman -S vim sudo wget networkmanager xorg xorg-server git openssh fakeroot base-devel tigervnc tmux neofetch` +`# pacman -S vim sudo visudo wget networkmanager xorg xorg-server git openssh fakeroot base-devel tigervnc tmux neofetch` + +- Create new user with sudo privileges +- Create a new user +`# useradd -mG wheel <username>` +``` +useradd = add a user +-m = associate a home directory +G = specify a group +wheel = group name +``` +- Password for new user +`# passwd <username>` +- Type in new password and retype it to verify +- Enable sudo privileges for any user of the `wheel` group, replace vim with editor of choice +`# EDITOR=vim visudo` +- Look for and uncomment `# %wheel ALL=(ALL) ALL`, save and exit + Example: +``` +%wheel ALL=(ALL) ALL +``` - Add <username> to sudoers. Edit/etc/sudoers with vi, add following lines beneath "root ALL=(ALL) ALL": `<username> ALL=(ALL) ALL` |