If you want to add a user along with his/her full name. Here is how to do it.
useradd -s /sbin/nologin -c "Younten Jamtsho" younten
With the above command, I am creating a user younten, who's full name is Younten Jamtsho. Addition to that, I am assigning nologin shell to the user younten so that he cannot log in to ssh.
Now that you have created the user, use finger command to see the details of the user.
finger younten
Lets change the default directory for the user youten from /home/younten to /var/www
usermod -d /var/www/ younten
Now lets change the existing username younten to webmaster
usermod -l younten webmaster
useradd -s /sbin/nologin -c "Younten Jamtsho" younten
With the above command, I am creating a user younten, who's full name is Younten Jamtsho. Addition to that, I am assigning nologin shell to the user younten so that he cannot log in to ssh.
Now that you have created the user, use finger command to see the details of the user.
finger younten
Lets change the default directory for the user youten from /home/younten to /var/www
usermod -d /var/www/ younten
Now lets change the existing username younten to webmaster
usermod -l younten webmaster
Comments
Post a Comment