Add users to Centos 7 learning and add users to centos
Before Centos is used, Ubuntu is used. Therefore, the two commands useradd and adduser are ambiguous. on Ubuntu, these two commands are used, while on Centos, the same command is used, adduser is a link.
# Ll/usr/sbin/| grep userlrwxrwxrwx. 1 root 7 October 30 17:09 adduser-> useradd-rwxr-x ---. 1 root 114064 June 10 09:16 useradd
1. Add a user. Centos does not have any interaction actions! After creating a user, you must change the password. Otherwise, you cannot log in.
# Useradd dev # create a user # passwd dev # change the password to change the user's dev password. New Password: re-enter the new password passwd: All authentication tokens have been successfully updated.
2. Add the sudo permission for the new user. Otherwise, it is not appropriate to ask the root boss about everything. You know!
1) Add writable permissions to the sudoers file
# Keep the permission mode of chmod-v u + w/etc/sudoers "/etc/sudoers as 0640 (rw-r -----)
2) Add new user information to # Allow root to run any commands anywher In the sudoers file.
# Allow root to run any commands anywherroot ALL = (ALL) ALLdev ALL = (ALL) ALL # Add User Information
3) cancel the sudoers file write permission
# chmod -v u-w /etc/sudoersmode of "/etc/sudoers" changed from 0640 (rw-r-----) to 0440 (r--r-----)
CentOS Learning Guide
To learn about linux, I installed a virtual machine first. The system is centos. Now version 6.3 is used. Buy a book, "laruence's Private food-basics", a good teaching material, combined with centos. Install php and mysql. You can run the yum-y install php-mysql-server command to install the network later.
How to configure the network in CentOS 7?
Virtual Machine-> edit-> Virtual Network editor has all been deleted, and you can set it again automatically. The connection should be available for normal selection.