Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the newusers command in Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use the newusers command in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Linux common commands newusers commands are used for batch processing to create more than one command at a time.

The way newusers is used for batch processing to create multiple commands at a time

Syntax newusers (parameters) Parameter user file: specifies a text file that contains user information in the same format as / etc/passwd.

Instance practical newusers command to add users in batches:

The usage is very simple, newusers is directly followed by a file, the file format and / etc/passwd format are the same.

User name 1:x:UID:GID: user description: user's home directory: example of SHELL used:

Jingang0:x:520:520::/home/jingang0:/sbin/nologin jingang1:x:521:521::/home/jingang1:/sbin/nologin. It is worth mentioning about the SHELL type. Check all the SHELL on the host, which can be viewed through chsh:

[root@localhost beinan] # chsh-- list / bin/sh / bin/bash / sbin/nologin / bin/ksh / bin/tcsh / bin/csh / bin/zsh in which all types of SHELL can log in to the system except / sbin/nologin. Nologin is mostly SHELL used by virtual users, that is, although he is a system user, he does not have permission to log in to the system. If you want to add such users, set his SHELL to / sbin/nologin, such as the above example.

Thank you for reading! This is the end of the article on "how to use newusers commands in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report