1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Linuxでユーザを追加する

Posted at

今更ですが、必要時に毎回調べているので今後はきちんと覚えたい。

ユーザ追加

/usr/sbin/useradd ユーザ名
 -u [uid] ユーザID指定
 -g [group] グループ指定
 -d [home dir] ホームディレクトリ指定
 -m ディレクトリ作成
 -s [/bin/sh] シェル指定

例)$ /usr/sbin/useradd -u 888 -g users -d /home/test -m test

ユーザ更新

/usr/sbin/usermod ユーザ名
 -u [uid] ユーザID変更
 -g [group] グループ変更
 -s [/bin/sh] シェル変更

シェルや、グループの指定方法はいつも忘れてファイルを直編集しているので、きちんとコマンドで制御したい。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?