1. To complete this case, you can add the following project experience:
Server User Rights Management transformation Scheme and implementation project
- Propose the solution of authority rectification to improve the status of super-authority root flooding in the company
- To convene a meeting to discuss a plan to advance implementation
- After implementation makes the company's authority management more clear
2. Status of the problem
Company server Management personnel, (development + operations + Architecture +dba+ Products + market), the use of Linux server, different functions of staff operation is not standardized, root authority flooding
3. Project Requirements
You want the root password of the superuser to be in the hands of a small or unique administrator, and you want multiple system administrators to have permissions
4 Implementation Scenario 4.1 information acquisition
4.1.1 convene relevant departments to discuss or communicate with each group of leaders to determine the feasibility of the Authority scheme
Support staff required: Operations Manager, CTO support, team leader. We as operations personnel, with similar to the teacher to explain this document, through the conference format to make speeches, impassioned speeches, to get the support of the Big Brothers
4.1.2 Summary, submit, audit all relevant employees on the Linux server permissions requirements
After getting support from the big boys, get the information you need by sending an email or contacting the relevant person. For example, let the managers of various departments organize the list of people who need the authority, the position and the corresponding business and authority.
4.1.3 Planning permissions according to Linux commands and services
The main operation and maintenance personnel according to the list of mobile phones above, the corresponding account configuration permissions
After the implementation of the 4.1.4 permission scheme, all employees must apply for the corresponding permission through the "Employee Linux Server administrative permission request form" to determine the approval process and standardize the management.
4.2 Collecting employee functions and corresponding permissions
1) Primary Operations 3
Rights Assignment: The permissions of the normal user, all permissions of the server being administered, but excludes some harm and the ability to switch root
Cmnd_alias c_cmd_1 =!/usr/bin/passwd,/usr/bin/passwd [a-za-z]*,!/usr/bin/passwd Root,!/sbin/fdisk,!/sbin/parted,!/ BIN/RM,!/bin/su,!/usr/sbin/visudo,!/usr/bin/vi * *sudo*,!/bin/vi*sudo* |
2) Operations Manager and senior operations: each one
Rights Assignment: Permissions for ordinary users, all permissions for servers under the jurisdiction
4) Network engineer: 1
Rights Assignment: Permissions for normal users, viewing network configuration, and troubleshooting permissions
Cmnd_alias n_cmd_1 =/sbin/route,/sbin/ifconfig,/bin/ping,/sbin/dhclient,/usr/bin/net,/sbin/iptables,/usr/bin/ Rfcomm,/usr/bin/wvdial,/sbin/iwconfig,/sbin/mii-tool,/bin/cat,/var/log/* |
5) General development: 10 people
Rights Assignment: Permissions for normal users, permissions to view logs for the service, restart corresponding service permissions
Large companies: The provisions of the project responsibility system
Cmnd_alias p_cmd_1 =/bin/cat ~/log/*,/bin/cat/var/log/message,/bin/cat/app/log/*,/bin/sh/~/scripts/deploy.sh |
4.3 Creating a user Role
Set up 3 primary operations, a network engineer, an operations manager, a senior OPS manager user, the password is 111111
For user in chuji001 chuji002 chuji003 net001 senior001 manager001 Do Useradd $user echo "111111" | passwd--stdin $user Done |
Build 10 developers, belonging to the Phpers group
Groupadd-g 999 phpers For n in ' seq 10 ' Do Useradd-g phpers php00$n Done |
4.4 Sudoers Configuration Content
Prior to backing up the/etc/sudoers file, Cp/etc/sudoers/etc/sudoers.ori
# #Cmnd_Alias by oldboy# #2012 Cmnd_alias c_cmd_1 =!/usr/bin/passwd,/usr/bin/passwd [a-za-z]*,!/usr/bin/passwd Root,!/sbin/fdisk,!/sbin/parted,!/ BIN/RM,!/bin/su,!/usr/sbin/visudo,!/usr/bin/vi * *sudo*,!/bin/vi*sudo* Cmnd_alias n_cmd_1 =/sbin/route,/sbin/ifconfig,/bin/ping,/sbin/dhclient,/usr/bin/net,/sbin/iptables,/usr/bin/ Rfcomm,/usr/bin/wvdial,/sbin/iwconfig,/sbin/mii-tool,/bin/cat,/var/log/* Cmnd_alias p_cmd_1 =/bin/cat ~/log/*,/bin/cat/var/log/message,/bin/cat/app/log/*,/bin/sh/~/scripts/deploy.sh # # User_alias by oldboy## #2012 User_alias ADMINS = senior001, Manager01 User_alias chujiadmins = chuji001, chuji002, chuji003 User_alias Netadmins = net001 User_alias programers =%phpers # #Runas_Alias by oldboy# #2012/11/30 Runas_alias Suuser = root #pri Config ADMINS all= (All) Nopasswd:all Chujiadmins all= (Suuser) nopasswd:all,c_cmd_1 Netadmins all= (Suuser) nopasswd:n_cmd_1 |
Programers all= (Suuser) nopasswd:p_cmd_1 |
Linux Course notes Linux system centralization management sudoer configuration case