[精讚] [會員登入]
6932

[LINUX] 利用 usermod 修改使用者的參數和資料

使用指令 usermod 修改使用者的參數和資料

分享此文連結 //n.sfs.tw/12995

分享連結 [LINUX] 利用 usermod 修改使用者的參數和資料@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2019-10-25 14:11:09 最後編修
2019-01-04 10:00:26 By 張○○
 

自動目錄

Linux 利用 usermod 修改使用者的參數和資料

修改使用者帳號

變更使用者帳號名稱

# usermod -l newname username

變更使用者 UID

# usermod -o -u 101 username

變更使用者主要群組

# usermod -g users username

變更使用者次要群組

# usermod -G mis,sales username

修改使用者註解內容

# usermod -c "manager" username

變更使用者家目錄路徑

# usermod -m -d /home/user username 

變更使用者預設 Shell

# usermod -s /usr/bin/ksh username

變更使用者過期期限

# usermod -e 1/1/2010 username

變更使用者密碼

# usermod -p FEeig.jYifke username

 等於 passwd username
 

參考資料

[1] http://blog.yam.com/gavint/article/23264761 (來源佚失)


原文 2010-07-06 15:10:54

END

你可能感興趣的文章

[Centos7] 安裝apache+php7+mariadb10+selinux Centos7 安裝apache+php7+mariadb10+selinux

dnf 一個即將取代 yum的套件管理程式 centos 系統中老牌的套件管理程式yum,也許未來將被dnf所取代

PHP for sphinx 函式庫安裝 PECL/sphinx PHP>= 5.2.2 已經能原生支援 sphinx,可是預設的沒有裝,我們得自己裝才能用

[Linux] 使用tarball安裝下載PERL的tar檔模組 在Linux下,perl下載的pm模組,不使用cpan的安裝方法

[Rocky9] codeignitor4+ nginx+ php8.1-fpm + docker compose 這次的目標是把服務裝在docker,裡面放入 nginx 和 php8.1-fpm的 docker container, 並採用codeignitor4。

[Centos8] 利用nmcli 設定ipv4 位址 Centos7之後修改網路設定變得比較麻煩一點,此篇介紹使用nmcli指令的方法

隨機好文

[jQuery] select 元件的取值及給值 html中的元件select,在jquery中要如何使用?

[bc] linux 的計算機 bc 設定小數位數、計算π、次方根 linux 的計算機 bc 設定小數位數、計算π、次方根

[CodeIgniter3] 解決無法上傳特定檔案(.sb2)的問題 上傳時出現The filetype you are attempting to upload is not allowed,要怎麼解決?

[AS3] 我做的唯一一個Flash As3遊戲UFO INVADSION [AS3] 我做的唯一一個Flash As3遊戲,是第一個也是最後一個,後來就沒再寫as3,不過as3還滿好玩的。

讓radio box 或checkbox 好按 在行動裝置下,radio box及checkbox變得很難按得到