Add Users
useradd [user] [options]
OPTIONS
-b, --base-dir-d, --home HOME_DIR
-e, --expiredate
-f, --inactive (The number of days after a password expires until the account is permanently disabled)
-u, --uid (user id)
-g, --gid (group id)
-G, --groups A list of supplementary groups
-p, --password (The encrypted password)
Delete User
userdel [user] [options]
OPTIONS
-f, --force-r, --remove (Files in the user's home directory will be removed)
Modify User Account
usermod [options] [user]
OPTIONS
-a, --append-d, --home HOME_DIR
-e, --expiredate
-f, --inactive INACTIVE (The number of days after a password expires until the account is permanently disabled)
-g, --gid
-G, --groups
-l, --login NEW_LOGIN (The name of the user will be changed)
-L, --lock (Lock a user's password)
-m, --move-home
-p, --password
Setting user permission
Sequence:Read Write ExecuteBinary
Read — 4 Write — 2 Execute — 1
sudo chmod -Rv 755 /path/to/folder/It can be read as permissions to Owner 7, to Group 5, to Others 5
-OR-
It can be display as
rwxr-xr-xIt's equivalent to 755
No comments:
Post a Comment