Security measures for Unix multi-user operating systems

Source: Internet
Author: User
Article Title: Security Measures for Unix multi-user operating systems. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Unix is a comprehensive multi-user operating system. Multiple users can perform operations on the same Unix system without mutual interference. However, to improve the security of multi-user operations in Unix systems, Unix engineers still need to take some necessary measures.

  1. Only specific users are allowed to shut down or restart the operating system.

When multiple users operate on Unix systems, if one of them is eager to shut down or restart the Unix operating system, this can cause a fatal blow to other users. To this end, it is usually better for Unix System Engineers to restrict only specific users to restart the Unix operating system or shut down the system. If a user needs to restart the Unix operating system for a specific reason, it must be reported to the system engineer or other specific users, let it view the existing activities of other users and determine whether the operating system can be restarted.

Usually, shutting down Unix systems or restarting them is the privilege of a Super User. This is quite different from the Windows operating system. Although System Engineers generally do not inform other users of the root Super User Password, System Engineers often want to have an independent account to manage the switch and restart the Unix operating system. In particular, if the Unix operating system is used as a server, it is necessary to set up an independent account for management. In Unix systems, it is not as simple as setting an account to have the right to switch hosts in Windows. You only need to add users to the Management Group. To create an account in Unix, you have the right to restart or shut down the account. Generally, you can do this by taking two steps.

  Step 1: First create a common user and assign its path, command, and other related parameters. For example, the author first creates a common user using the useradd command. The command is as follows:

Useradd? U 120? G group? S/bin/sh? D/home/shut? M shut (or reboot ).

This command is mainly used to create an even user. I don't need to explain the parameters of this command too much. Note that when you use the Useradd command to add a user, you cannot directly set the user's UID to 0 (the Super User's Uid ). Because the Unix system does not allow duplicate superuser UID.

  Step 2: Grant it the permission to restart or shut down. Since shutdown or restart is a Super User Privilege, this user has no permission to shut down after it is created. In this case, the system engineer needs to change the relevant files so that the user has the permission in this respect. For example, the system engineer can modify the/etc/passwd file, find the user just created, and set the UID of this user to 0. In this case, the user's UID is 0, so it has the privilege of a Super User. In addition, it should be noted that sometimes the system engineer may want this user to have the right to shut down or restart the operating system out of security concerns, rather than doing anything else. At this time, this account has the root privilege of the system, so it has full control of the Unix operating system. This may cause some security risks for Unix systems. Therefore, this consideration of System Engineers is also necessary. If you want System Engineers to execute shutdown or reboot commands without any other maintenance actions, you can modify the user's. to insert commands such as shutdown to the user's profile file. Some other experts say that it is best to add the exec command before this command. I don't know if this method can be used. I personally think it is a bit superfluous. You can try it on your own. Is this necessary.

[1] [2] Next page

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.