Ubuntu user追加

はてなブックマーク - Ubuntu user追加
LINEで送る
Pocket

Ubuntu user追加

コマンド「adduser」を使います。

sudo adduser demo2

ユーザー追加は、rootの権限あるいは、sudoグループに入る必要があります。

上の画面で、「Y」Yes作成しますと答えると、ユーザーが作成されます。

// Ubuntuで作成済みのグループ一覧を確認するコマンド
$ cat /etc/group

最後確認できれば、完了です。

また、このユーザーをsudoグループに追加したい場合は

sudo usermod -aG sudo [your_user_name]

注意、ここのaがとても大事です!これがないと、他の全てのグループから削除されます。

ここですと、sudo usermod -aG demo2となりますね。

一回ログアウトして、ログインすれば、反映されます。

はてなブックマーク - Ubuntu user追加
LINEで送る
Pocket

Add a Comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close