Learning notes-batch create and set passwords and delete users in Linux
Source: Internet
Author: User
Learning notes-basic knowledge of creating users and setting passwords and deleting users in Linux in batches: root: x: 0: 0: root:/bin/bash User: Password: User ID: group ID: Full name: bashUser: Password: Uid: Gid: FullName: bash. Next, we will use two methods to batch... learning notes-basic knowledge of creating users and setting passwords and deleting users in Linux in batches: root: x: 0: 0: root:/bin/bash User: Password: User ID: group ID: Full Name: bash User: Password: Uid: Gid: Full Name: bash. Next, you can process users in batches in two ways, brief introduction to redirection and script redirection> stdout (standard output) standard output-1 in algebra, writing commands to documents or devices-can be understood as overwriting <stdin (standard input) standard input-the algebra is 0. data is read from a file.> Append data to the end of the file without deleting its own data> & write data from one handle to another <& likewise, read another handle to the left | pipeline operation, the command to process redirection method after throwing the data on the left to the pipeline: Create a user using vimfor batch creation, for example, testusers.txt (with a random name), and write it according to the specifications in/etc/passwd .. User01: 500: 500: USER01:/home/user01:/bin/bash user02: 500: 500: USER02:/home/user02:/bin/bash user03 :: 500: 500: USER03:/home/user03:/bin/bash user04: 500: 500: USER04:/home/user04: run/bin/bash on the terminal (management identity) root @ crper :~ # Newusers <testUser.txt because I am processing the directory of this file, you can directly do this if it is another directory .. You can use the absolute path eg: newusers
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.