最終更新:2014-03-19 (水) 17:55:28 (2090d)  

adduser はてなブックマークを見る
Top / adduser

add a user or group to the system

対話形式でユーザを作成

使い方

  • ユーザを作成
    adduser [options] user
  • ユーザをグループに追加
    adduser [options] user group

  • # adduser hoge sudo
    adduser: The user 'hoge' does not exist.
  • # adduser hoge
    Adding user `hoge' ...
    Adding new group `hoge' (1001) ...
    Adding new user `hoge' (1001) with group `hoge' ...
    Creating home directory `/home/hoge' ...
    Copying files from `/etc/skel' ...
    Enter new UNIX password: 
    Retype new UNIX password: 
    passwd: password updated successfully
    Changing the user information for hoge
    Enter the new value, or press ENTER for the default
    	Full Name []: 
    	Room Number []: 
    	Work Phone []: 
    	Home Phone []: 
    	Other []: 
    Is the information correct? [Y/n] Y
    # adduser hoge sudo
    Adding user `hoge' to group `sudo' ...
    Adding user hoge to group sudo
    Done.
    

sudo

adduser foo sudo

メモ

  • adduser/useraddに違いがあるのはDebianのみ
  • Fedora/CentOS系では両方は同じコマンド

関連