This commit is contained in:
Malin Freeborn
2020-01-05 13:33:53 +01:00
parent a7bd1c2233
commit 1e89f9776d
12 changed files with 48 additions and 96 deletions

View File

@@ -18,15 +18,12 @@ will require sudo.
add user 'maestro'
This depends upon the settings in the /etc/default/useradd file and /etc/login.defs
> sudo useradd -m pinkie
add user 'pinkie' with a home directory
> sudo adduser -m -e 2017-04-25 temp
add expiry date to user
@@ -67,49 +64,36 @@ add user maestro to group sudo
list users' passwords (and therefore users)
> groupadd awesome
create the group 'awesome'
passwords are stored in /etc/shadow.
there are user accounts for processes such as 'bin' and 'nobody' which are locked, so they're unusable.
> passwd -l bin
lock the user 'bin'
> more /etc/passwd | grep games
we find the name, password and user id of the user 'games'. I.e. the password is 'x', and the user id is '5'. The password is an impossible hash, so no input password could match.
> groupdel learners | delete the group 'learners'
> gpasswd -d pi games | remove user 'pi' from the group 'games'
> id games
find the id number of group 'games' (60)
> usermod -aG sudo maestro
add user to group 'maestro'
user info is stored in /etc's passwd, shadow, group and gshadow
# Defaults
The default new user profiles are under /etc/skel.
@@ -146,7 +130,6 @@ usermod -L henry
-u let's you manually specifiy a UID.
# Groups
In /etc/group, a group file may look like this:
@@ -219,4 +202,3 @@ Then have a look at resource usage per user.
This will modify process.sh to that instead of being simply executable, anyone executing it will have the permissions as if owner while executing it.