How to add user
How to add user
- Check an user exists
$ cat /etc/passwd | grep testuser - Set home directory and shell env
- Ubuntu, SUSE
$ useradd <username> -m -s /bin/bash->
-moption should be declared to make home directory ->-s /bin/bashoption should be declared set shell env - CentOS
$ useradd <username>-> CentOS or Redhat linux don’t need to option for home directory and shell env
- Ubuntu, SUSE
- Make user with giving a group
$ useradd <username> -G <groupname> - Make user with UID
An UID is number$ useradd <username> -u <uid>
Leave a Comment