linux使用者管理命令

2021-05-27 19:50:35 字數 1064 閱讀 3775

最近經常用的一些linux命令,mark一下,免得每次都要google一下用法。

useradd - adding a new user

usermod - modifying existing user

userdel - deleting a user

passwd - user's password

where user and group information stored

su - switch user

permissions

chmod - changing permissions

chown - changing owner

chgrp - changing group

useradd example - add a new user to secondary group

useradd example - add a new user to primary group

usermod example - add a existing user to existing group

task: make sure group sales exists

task: add a new user tom to group sales

step # 1: find out user group identity

step # 2: remove user from printer group

linux使用者管理命令

下新增使用者 useradd 使用者名稱 為使用者名稱添 加密碼 passwd 使用者名稱 檢視系統中的所有使用者 cat etc passwd cut f 1 d 注意 是管道,把cat的輸出傳給cut處理 後面的cut取出每一行的以 分割的第一欄。用who命令可以檢視當前登入的使用者有哪些,乙個...

Linux 使用者管理命令

useradd 命令格式 命令 useradd 選項 使用者名稱 選項 u uid 手工指定使用者的uid號 d 家目錄 手工指定使用者家目錄 c 使用者說明 手工指定使用者的說明 g 組名 手工指定使用者的初始組 g 組名 手工指定使用者的附加組 s shell 手工指定使用者登入的shell 預...

linux使用者管理命令

一 使用者管理命令 使用者資訊檔案 etc passwd aa x 501 501 空 home aa bin bash 第一列 使用者名稱 第二列 密碼位 第三列 uid 使用者id 500 普通使用者 第四列 gid 初始組id 第五列 使用者說明 第六列 家目錄 第七列 使用者登入之後的許可權...