Search This Blog

Labels

adobe (1) android (3) apache (3) aviation (1) bash (2) chrome (2) composer (1) cookery (3) dev (2) dodanperks (1) extensions (1) facebook (2) firefox (1) git (2) grafana (1) guzzle (1) headaches (11) htaccess (1) html5 (2) jquery (2) lamp (1) life hacks (10) linux (28) mysqli (2) native (1) opera (2) php (10) railfanning (1) reactjs (3) reactnative (1) servers (11) sinhala (1) smartphones (2) snap (1) sound (1) tech (22) troubleshoots (4) ubuntu (29) unicode (4) virtualbox (1) wamp (2) web (11) windows (4) wordpress (3) youtube (2) කෑම (3)

Tuesday, 15 July 2014

Linux 6: User Management II

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 Execute
Binary
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-x
It's equivalent to 755

No comments:

Post a Comment