diff --git a/content/en/docs/Administration/configuring-the-repo-server.md b/content/en/docs/Administration/configuring-the-repo-server.md index 72a12fc16d6fcf493ff3c8351393685c3334e1cc..4fa5736abb42749d1898baa2e9a108941e30aeb6 100644 --- a/content/en/docs/Administration/configuring-the-repo-server.md +++ b/content/en/docs/Administration/configuring-the-repo-server.md @@ -95,13 +95,14 @@ You can update the repo source in either of the following ways: - Add rpm packages to the Packages directory of the repo source and update the repo source. You can run the createrepo command to update the repo source. ``` - $ createrepo --update --workers=10 /srv/repo + $ createrepo --update --workers=10 ~/srv/repo ``` + In this command, \-\-update indicates the update, and \-\-workers indicates the number of threads, which can be customized. >![](public_sys-resources/icon-note.gif) **NOTE:** - >If the command output contains "createrepo: command not found", run the **dnf install createrepo** command as the **root** user to install the **createrepo** softeware. +>If the command output contains "createrepo: command not found", run the **dnf install createrepo** command as the **root** user to install the **createrepo** softeware. ## Deploying the Remote Repo Source @@ -119,7 +120,7 @@ Install openEuler OS and deploy the repo source using Nginx on openEuler OS. >The configuration content in this document is for reference only. You can configure the content based on the site requirements \(for example, security hardening requirements\). ``` - user openEuler; + user nginx; worker_processes auto; # You are advised to set this parameter to core-1. error_log /var/log/nginx/error.log warn; # log storage location pid /var/run/nginx.pid; @@ -142,12 +143,12 @@ Install openEuler OS and deploy the repo source using Nginx on openEuler OS. server { listen 80; - server_name localhost; #Server name (URL) + server_name localhost; #Server name (URL) client_max_body_size 4G; - root /home/openEuler/srv/repo; #Default service directory + root /usr/share/nginx/repo; #Default service directory location / { - autoindex on; # Enable the access to lower-layer files in the directory. + autoindex on; # Enable the access to lower-layer files in the directory. autoindex_exact_size on; autoindex_localtime on; } @@ -173,19 +174,19 @@ Install openEuler OS and deploy the repo source using Nginx on openEuler OS. $ systemctl status nginx ``` - - [Figure 1](#en-us_topic_0151920971_fd25e3f1d664b4087ae26631719990a71) indicates that the Nginx service is started successfully. + - [Figure 1](#en-us_topic_0151920971_fd25e3f1d664b4087ae26631719990a71) indicates that the Nginx service is started successfully. - **Figure 1** The Nginx service is successfully started. - ![](figures/the-nginx-service-is-successfully-started.png "the-nginx-service-is-successfully-started") + **Figure 1** The Nginx service is successfully started. + ![](figures/the-nginx-service-is-successfully-started.png "the-nginx-service-is-successfully-started") - - If the Nginx service fails to be started, view the error information. + - If the Nginx service fails to be started, view the error information. ``` $ systemctl status nginx.service --full ``` - **Figure 2** Nginx startup failure - ![](figures/nginx-startup-failure.png "nginx-startup-failure") + **Figure 2** Nginx startup failure + ![](figures/nginx-startup-failure.png "nginx-startup-failure") As shown in [Figure 2](#en-us_topic_0151920971_f1f9f3d086e454b9cba29a7cae96a4c54), the Nginx service fails to be created because the /var/spool/nginx/tmp/client\_body directory fails to be created. You need to manually create the directory as the **root** user. Similar problems are solved as follows: @@ -200,21 +201,18 @@ Install openEuler OS and deploy the repo source using Nginx on openEuler OS. ### Deploying the Repo Source -1. Run the following command to create the /home/openEuler/srv/repo directory specified in the Nginx configuration file /etc/nginx/nginx.conf: +1. Run the following command as the **root** user to create the /usr/share/nginx/repo directory specified in the Nginx configuration file /etc/nginx/nginx.conf: ``` - $ mkdir -p /home/openEuler/srv/repo + # mkdir -p /usr/share/nginx/repo ``` -2. Set the SELinux working mode to the permissive mode as the **root** user: +2. Run the followding command as the **root** user to modify the /usr/share/nginx/repo directory permission: ``` - # setenforce permissive + # chmod -R 755 /usr/share/nginx/repo ``` - >![](public_sys-resources/icon-note.gif) **NOTE:** - >After the repo server is restarted, you need to configure the repo server again. - 3. Configure firewall rules as the **root** user to enable the port \(port 80\) configured for Nginx. ``` @@ -239,25 +237,26 @@ Install openEuler OS and deploy the repo source using Nginx on openEuler OS. **Figure 3** Nginx deployment succeeded ![](figures/nginx-deployment-succeeded.png "nginx-deployment-succeeded") -5. Use either of the following methods to add the repo source to the /home/openEuler/srv/repo directory: - - Copy related files in the image to the /home/openEuler/srv/repo directory. +5. Use either of the following methods to add the repo source to the /usr/share/nginx/repo directory: + - Copy related files in the image to the /usr/share/nginx/repo directory as the **root** user. ``` # mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/ - $ cp -r /mnt/Packages /home/openEuler/srv/repo/ - $ cp -r /mnt/repodata /home/openEuler/srv/repo/ - $ cp -r /mnt/RPM-GPG-KEY-openEuler /home/openEuler/srv/repo/ + # cp -r /mnt/Packages /usr/share/nginx/repo/ + # cp -r /mnt/repodata /usr/share/nginx/repo/ + # cp -r /mnt/RPM-GPG-KEY-openEuler /usr/share/nginx/repo/ + # chmod -R 755 /usr/share/nginx/repo ``` The **openEuler-20.03-LTS-aarch64-dvd.iso** file is stored in the **/home/openEuler** directory. - - Create a soft link for the repo source in the /home/openEuler/srv/repo directory. + - Create a soft link for the repo source in the /usr/share/nginx/repo directory as the **root** user. ``` - $ ln -s /home/openEuler/os /home/openEuler/srv/repo/os + # ln -s /mnt /usr/share/nginx/repo/os ``` - /home/openEuler/os is the created repo source, and /home/openEuler/srv/repo/os points to /home/openEuler/os. + /mnt is the created repo source, and /usr/share/nginx/repo/os points to /mnt. @@ -294,14 +293,14 @@ You can configure the built repo as the yum source and create the \*\*\*.repo co ``` [base] name=base - baseurl=http://192.168.1.2/ + baseurl=http://192.168.139.209/ enabled=1 gpgcheck=1 - gpgkey=http://192.168.1.2/RPM-GPG-KEY-openEuler + gpgkey=http://192.168.139.209/RPM-GPG-KEY-openEuler ``` >![](public_sys-resources/icon-note.gif) **NOTE:** - >192.168.1.2 is an example. Replace it with the actual IP address. + >192.168.139.209 is an example. Replace it with the actual IP address. ### repo Priority @@ -311,11 +310,11 @@ If there are multiple repo sources, you can set the repo priority in the .repo f ``` [base] name=base -baseurl=http://192.168.1.2/ +baseurl=http://192.168.139.209/ enabled=1 priority=2 gpgcheck=1 -gpgkey=http://192.168.1.2/RPM-GPG-KEY-openEuler +gpgkey=http://192.168.139.209/RPM-GPG-KEY-openEuler ``` >![](public_sys-resources/icon-note.gif) **NOTE:** diff --git a/content/en/docs/Administration/configuring-the-web-server.md b/content/en/docs/Administration/configuring-the-web-server.md index e4e375aa17897131d9c0efe1fd2c0f4d71e0a55e..0903e98c231ca69bd4074ed56eb6fb4ef32525d4 100644 --- a/content/en/docs/Administration/configuring-the-web-server.md +++ b/content/en/docs/Administration/configuring-the-web-server.md @@ -282,7 +282,7 @@ After the web server is set up, perform the following operations to check whethe Run the following command to check whether the web page can be accessed. If the service is successfully set up, the web page can be accessed. ``` - $ curl https://192.168.1.60 + $ curl http://192.168.1.60 ``` Run the following command to check whether the command output is 0. If the command output is 0, the httpd server is successfully set up. @@ -295,11 +295,11 @@ After the web server is set up, perform the following operations to check whethe Open the browser and enter the following address in the address box. If the web page can be accessed, the httpd server is successfully set up. - https://192.168.1.60_ + http://192.168.1.60 If the port number is changed, enter the address in the following format: - https://192.168.1.60: port number_ + http://192.168.1.60: port number @@ -538,8 +538,8 @@ After the web server is set up, perform the following operations to check whethe Open the browser and enter the following address in the address box. If the web page can be accessed, the Nginx server is successfully set up. - http://192.168.1.60_ + http://192.168.1.60 If the port number is changed, enter the address in the following format: - http://192.168.1.60: port number_ + http://192.168.1.60: port number diff --git a/content/en/docs/Administration/user-management.md b/content/en/docs/Administration/user-and-user-group-management.md similarity index 57% rename from content/en/docs/Administration/user-management.md rename to content/en/docs/Administration/user-and-user-group-management.md index ebf819d90a67c0028a63c7abe20274cdce1ad27b..a63178022f5bebfc4764bc4302eadf80708b2003 100644 --- a/content/en/docs/Administration/user-management.md +++ b/content/en/docs/Administration/user-and-user-group-management.md @@ -1,37 +1,37 @@ -# User Management +# User and User Group Management In Linux, each common user has an account, including the user name, password, and home directory. There are also special users created for specific purposes, and the most important special user is the admin account whose default user name is root. In addition, Linux provides user groups so that each user belongs to at least one group, facilitating permission management. The control of users and user groups is a core element of openEuler security management. This topic introduces the user and group management commands and explains how to assign privileges to common users in graphical user interface and on command lines. -- [User Management](#user-management) - - [Adding a User](#adding-a-user) - - [useradd Command](#useradd-command) - - [User Information Files](#user-information-files) - - [Example](#example) - - [Modifying a User Account](#modifying-a-user-account) - - [Changing a Password](#changing-a-password) - - [Changing User's Login Shell](#changing-users-login-shell) - - [Changing the Home Directory](#changing-the-home-directory) - - [Changing a UID](#changing-a-uid) - - [Changing Account Expiry Date](#changing-account-expiry-date) - - [Deleting Users](#deleting-users) - - [Granting Rights to a Common User](#granting-rights-to-a-common-user) +- [User and User Group Management](#user-and-user-group-management) + - [Managing Users](#managing-users) + - [Adding a User](#adding-a-user) + - [Modifying a User Account](#modifying-a-user-account) + - [Deleting a User](#deleting-a-user) + - [Granting Rights to a Common User](#granting-rights-to-a-common-user) + - [Managing User Groups](#managing-user-groups) + - [Adding a User Group](#adding-a-user-group) + - [Modifying a User Group](#modifying-a-user-group) + - [Deleting a User Group](#deleting-a-user-group) + - [Adding a User to a Group or Removing a User from a Group](#adding-a-user-to-a-group-or-removing-a-user-from-a-group) + - [Changing the Current Group of a User to a Specified Group](#changing-the-current-group-of-a-user-to-a-specified-group) +## Managing Users -## Adding a User +### Adding a User -### useradd Command -Run the **useradd** command as the user **root** to add user information to the system. In the command, _options_ indicates related parameters and _user\_name_ indicates the user name. +#### useradd Command +Run the **useradd** command as the user **root** to add user information to the system. In the command, _options_ indicates related parameters and _username_ indicates the user name. ``` -useradd [options] user_name +useradd [options] username ``` -### User Information Files +#### User Information Files The following files contain user account information: - /etc/passwd: user account information @@ -41,11 +41,11 @@ The following files contain user account information: - /etc/login.defs: system wide settings - /etc/skel: default directory that holds initial configuration files -### Example -For example, to create a user named user\_example, run the following command as the user **root**: +#### Example +For example, to create a user named userexample, run the following command as the user **root**: ``` -# useradd user_example +# useradd userexample ``` >![](public_sys-resources/icon-note.gif) **NOTE:** @@ -54,21 +54,43 @@ For example, to create a user named user\_example, run the following command as To view information about the new user, run the **id** command: ``` -# id user_example -uid=502(user_example) gid=502(user_example) groups=502(user_example) +# id userexample +uid=502(userexample) gid=502(userexample) groups=502(userexample) ``` -To change the password of the user\_example, run the following command: +To change the password of the userexample, run the following command: ``` -# passwd user_example +# passwd userexample ``` + +The password of the user must meet the password complexity requirements. The password complexity requirements are as follows: + +1. A password must contain at least eight characters. +2. A password must contain at least three of the following types: uppercase letters, lowercase letters, digits, and special characters. +3. A password must be different from the account name. +4. A password cannot contain words in the dictionary. + - Querying a dictionary + In the installed openEuler environment, you can run the following command to export the dictionary library file **dictionary.txt**, and then check whether the password is in the dictionary. + ``` + cracklib-unpacker /usr/share/cracklib/pw_dict > dictionary.txt + ``` + - Modifying a dictionary + 1. Modify the exported dictionary library file, and then run the following command to update the dictionary library: + ``` + # create-cracklib-dict dictionary.txt + ``` + 2. Run the following command to add another dictionary file **custom.txt** to the original dictionary library. + ``` + # create-cracklib-dict dictionary.txt custom.txt + ``` + Then, enter the password and confirm it as prompted: ``` -# passwd user_example -Changing password for user user_example. +# passwd userexample +Changing password for user userexample. New password: Retype new password: passwd: all authentication tokens updated successfully. @@ -77,27 +99,27 @@ passwd: all authentication tokens updated successfully. >![](public_sys-resources/icon-note.gif) **NOTE:** >If the command output contains **BAD PASSWORD: The password fails the dictionary check - it is too simplistic/sytematic**, the password is too simple and needs to be reset. -## Modifying a User Account +### Modifying a User Account -### Changing a Password +#### Changing a Password Common users can change their passwords using the **passwd** command. Only the admin is allowed to use the **passwd username** command to change passwords for other users. -### Changing User's Login Shell +#### Changing User's Login Shell Common users can use the **chsh** command to change their login shell. Only the admin is allowed to run the **chsh username** command to change login shell for other users. -Users can also run the **usermod** command as the user **root** to modify the shell information. In the command, _new\_shell\_path_ indicates the target shell path, and _username_ indicates the user name to be modified. Change them based on the site requirements. +Users can also run the **usermod** command as the user **root** to modify the shell information. In the command, _new_shell_path_ indicates the target shell path, and _username_ indicates the user name to be modified. Change them based on the site requirements. ``` usermod -s new_shell_path username ``` -For example, to change the shell of user\_example to csh, run the following command: +For example, to change the shell of userexample to csh, run the following command: ``` -# usermod -s /bin/csh user_example +# usermod -s /bin/csh userexample ``` -### Changing the Home Directory +#### Changing the Home Directory - To change the home directory, run the following command as the user **root**. In the command, _new\_home\_directory_ indicates the created target home directory, and _username_ indicates the user name to be changed. Change them based on the site requirements. ``` @@ -111,7 +133,7 @@ For example, to change the shell of user\_example to csh, run the following comm ``` -### Changing a UID +#### Changing a UID To change the user ID, run the following command as the user **root**. In the command, _UID_ indicates the target user ID and _username_ indicates the user name. Change them based on the site requirements. ``` @@ -120,14 +142,14 @@ usermod -u UID username The usermod command can change a user's UID in all files and directories under the user's home directory. However, for files outside the user's home directory, their owners can only be changed using the **chown** command. -### Changing Account Expiry Date +#### Changing Account Expiry Date If the shadow password is used, run the following command as the user **root** to change the validity period of an account. In the command, _MM_, _DD_, and _YY_ indicate the month, day, and year, respectively, and _username_ indicates the user name. Change them based on the site requirements. ``` usermod -e MM/DD/YY username ``` -## Deleting Users +### Deleting a User Run the **userdel** command as the user **root** to delete an existing user. @@ -140,9 +162,9 @@ For example, run the following command to delete user Test: If you also need to delete the user's home directory and all contents in the directory, run the **userdel** command with the -r option to delete them recursively. >![](public_sys-resources/icon-note.gif) **NOTE:** ->You are not advised to directly delete a user who has logged in to the system. To forcibly delete a user, run the **userdel -f** _Test_ command. +>You are not advised to directly delete a user who has logged in to the system. To forcibly delete a user, run the **userdel -f** _Test_ command. -## Granting Rights to a Common User +### Granting Rights to a Common User The **sudo** command allows common users to execute commands that can be executed only by administrator accounts. @@ -223,3 +245,83 @@ In the preceding information: POWERUSER can run all commands except the **su** command as the user **root** on all hosts. + +## Managing User Groups + +### Adding a User Group + +#### groupadd Command +Run the **groupadd** command as the **root** user to add user group information to the system. In the command, _options_ indicates related parameters and _groupname_ indicates the group name. + +``` +groupadd [options] groupname +``` + +#### User Group Information Files +The following files contain user group information: + +- /etc/gshadow file: user group encryption information +- /etc/group file: group information +- /etc/login.defs: system wide settings + +#### Example +For example, to create a user group named groupexample, run the following command as the **root** user: + +``` +# groupadd groupexample +``` + +### Modifying a User Group + +#### Changing a GID +To change the user group ID, run the following command as the **root** user. In the command, _GID_ indicates the target user group ID and _groupname_ indicates the user group name. Change them based on the site requirements. + +``` +groupmod -g GID groupname +``` + +#### Changing a User Group Name +To change the user group name, run the following command as the **root** user. In the command, _newgroupname_ indicates the user group new name and _oldgroupname_ indicates the user group name. Change them based on the site requirements. + +``` +groupmod -n newgroupname oldgroupname +``` + +### Deleting a User Group + +Run the **groupdel** command as the **root** user to delete an existing user group. + +For example, run the following command to delete user group Test: + +``` +# groupdel Test +``` + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>The user's primary group cannot be directly deleted. To forcibly delete a user's primary group, run the **groupdel -f** _Test_ command. + +### Adding a User to a Group or Removing a User from a Group + +Run the **gpasswd** command as the **root** user to add a user to a group or remove a user from a group. + +For example, run the following command to add the user userexample to the user group Test: + +``` +# gpasswd -a userexample Test +``` + +For example, run the following command to remove the user userexample from the user group Test: + +``` +# gpasswd -d userexample Test +``` + +### Changing the Current Group of a User to a Specified Group + +If a user belongs to multiple user groups, run the **newgrp** command to switch the user to another user group after logging in to the system. Then, the user has the permission of other user groups. + +For example, run the following command to change the current group of the user userexample to the user group Test: + +``` +$ newgrp Test +``` diff --git a/content/en/docs/ApplicationDev/building-an-rpm-package.md b/content/en/docs/ApplicationDev/building-an-rpm-package.md index 5ab6079aa21c130b8353e2fc18e2e694ca8d6096..d544280230b6501fe871a704177d373388197358 100644 --- a/content/en/docs/ApplicationDev/building-an-rpm-package.md +++ b/content/en/docs/ApplicationDev/building-an-rpm-package.md @@ -518,7 +518,7 @@ This section describes how to build an RPM software package online on OBS. To modify the source code of the existing software and build the modified source file into an RPM software package on the OBS web client, perform the following steps: -1. Log in to OBS at [http://openeuler-build.huawei.com/](http://openeuler-build.huawei.com/). +1. Log in to OBS at [https://build.openeuler.org/](https://build.openeuler.org/). 2. Click **All Projects**. The **All Projects** page is displayed. 3. Click the project to be modified. The project details page is displayed. For example, click **openEuler:Mainline**. 4. On the project details page, search for the software package to be modified and click the software package name. The software package details page is displayed. @@ -642,12 +642,12 @@ You have obtained the **root** permission, and have configured a repo source f $ vi ~/.oscrc ``` - 2. Add the **user** and **pass** fields to **\~/.oscrc**. The values of _userName_ and _passWord_ are the account and password registered on the OBS website \([http://openeuler-build.huawei.com/](http://openeuler-build.huawei.com/)\). + 2. Add the **user** and **pass** fields to **\~/.oscrc**. The values of _userName_ and _passWord_ are the account and password registered on the OBS website \([https://build.openeuler.org/](https://build.openeuler.org/)\). ``` [general] - apiurl = http://openeuler-build.huawei.com/ - [http://openeuler-build.huawei.com/] + apiurl = https://build.openeuler.org/ + [https://build.openeuler.org/] user=userName pass=passWord ``` diff --git a/content/en/menu/index.md b/content/en/menu/index.md index e5fa8da14016c701bf021077e8defe6447871869..8904c6085341ecb39ee150b95b7d25323c364e9f 100644 --- a/content/en/menu/index.md +++ b/content/en/menu/index.md @@ -28,7 +28,7 @@ headless: true - [Administrator Guide]({{< relref "./docs/Administration/administration.md" >}}) - [Viewing System Information]({{< relref "./docs/Administration/viewing-system-information.md" >}}) - [Basic Configuration]({{< relref "./docs/Administration/basic-configuration.md" >}}) - - [User Management]({{< relref "./docs/Administration/user-management.md" >}}) + - [User and User Group Management]({{< relref "./docs/Administration/user-and-user-group-management.md" >}}) - [Using the DNF to Manage Software Packages]({{< relref "./docs/Administration/using-the-dnf-to-manage-software-packages.md" >}}) - [Service Management]({{< relref "./docs/Administration/service-management.md" >}}) - [Process Management]({{< relref "./docs/Administration/process-management.md" >}}) diff --git "a/content/zh/docs/Administration/\346\220\255\345\273\272repo\346\234\215\345\212\241\345\231\250.md" "b/content/zh/docs/Administration/\346\220\255\345\273\272repo\346\234\215\345\212\241\345\231\250.md" index 589f40478cbca6bbfcf0de9ca6d86e096c148e08..ee458e049c6f6cd94768e5dcc03ab6f55971b0e0 100644 --- "a/content/zh/docs/Administration/\346\220\255\345\273\272repo\346\234\215\345\212\241\345\231\250.md" +++ "b/content/zh/docs/Administration/\346\220\255\345\273\272repo\346\234\215\345\212\241\345\231\250.md" @@ -139,7 +139,7 @@ Packages为rpm包所在的目录,repodata为repo源元数据所在的目录, listen 80; server_name localhost; # 服务器名(url) client_max_body_size 4G; - root /home/openEuler/srv/repo; # 服务默认目录 + root /usr/share/nginx/repo; # 服务默认目录 location / { autoindex on; # 开启访问目录下层文件 @@ -168,19 +168,19 @@ Packages为rpm包所在的目录,repodata为repo源元数据所在的目录, $ systemctl status nginx ``` - - [图1](#zh-cn_topic_0151920971_fd25e3f1d664b4087ae26631719990a71)表示nginx服务启动成功 + - [图1](#zh-cn_topic_0151920971_fd25e3f1d664b4087ae26631719990a71)表示nginx服务启动成功 - **图 1** nginx服务启动成功 - ![](figures/nginx服务启动成功.png "nginx服务启动成功") + **图 1** nginx服务启动成功 + ![](figures/nginx服务启动成功.png "nginx服务启动成功") - - 若nginx服务启动失败,查看错误信息: + - 若nginx服务启动失败,查看错误信息: ``` $ systemctl status nginx.service --full ``` - **图 2** nginx服务启动失败 - ![](figures/nginx服务启动失败.png "nginx服务启动失败") + **图 2** nginx服务启动失败 + ![](figures/nginx服务启动失败.png "nginx服务启动失败") 如[图2](#zh-cn_topic_0151920971_f1f9f3d086e454b9cba29a7cae96a4c54)所示nginx服务创建失败,是由于目录/var/spool/nginx/tmp/client\_body创建失败,在root权限下手动进行创建,类似的问题也这样处理: @@ -195,21 +195,18 @@ Packages为rpm包所在的目录,repodata为repo源元数据所在的目录, ### repo源部署 -1. 创建nginx配置文件/etc/nginx/nginx.conf中指定的目录/home/openEuler/srv/repo: +1. 在root权限下创建nginx配置文件/etc/nginx/nginx.conf中指定的目录/usr/share/nginx/repo: ``` - $ mkdir -p /home/openEuler/srv/repo + # mkdir -p /usr/share/nginx/repo ``` -2. 在root权限下将SELinux设置为宽容模式: +2. 在root权限下修改目录/usr/share/nginx/repo的权限: ``` - # setenforce permissive + # chmod -R 755 /usr/share/nginx/repo ``` - >![](public_sys-resources/icon-note.gif) **说明:** - >repo server重启后,需要重新设置。 - 3. 设置防火墙规则,开启nginx设置的端口(此处为80端口),在root权限下通过firewall设置端口开启: ``` @@ -234,25 +231,26 @@ Packages为rpm包所在的目录,repodata为repo源元数据所在的目录, **图 3** nginx部署成功 ![](figures/nginx部署成功.png "nginx部署成功") -5. 通过下面几种方式将repo源放入到/home/openEuler/srv/repo下: - - 拷贝镜像中相关文件至在/home/openEuler/srv/repo下 +5. 通过下面几种方式将repo源放入到/usr/share/nginx/repo下: + - 在root权限下拷贝镜像中相关文件至/usr/share/nginx/repo下,并修改目录权限。 ``` # mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/ - $ cp -r /mnt/Packages /home/openEuler/srv/repo/ - $ cp -r /mnt/repodata /home/openEuler/srv/repo/ - $ cp -r /mnt/RPM-GPG-KEY-openEuler /home/openEuler/srv/repo/ + # cp -r /mnt/Packages /usr/share/nginx/repo + # cp -r /mnt/repodata /usr/share/nginx/repo + # cp -r /mnt/RPM-GPG-KEY-openEuler /usr/share/nginx/repo + # chmod -R 755 /usr/share/nginx/repo ``` - + openEuler-20.03-LTS-aarch64-dvd.iso存放在/home/openEuler目录下。 - - - 在/home/openEuler/srv/repo下创建repo源的软链接 - + + - 使用root在/usr/share/nginx/repo下创建repo源的软链接。 + ``` - $ ln -s /home/openEuler/os /home/openEuler/srv/repo/os + # ln -s /mnt /usr/share/nginx/repo/os ``` - - /home/openEuler/os为已经创建好的repo源,/home/openEuler/srv/repo/os将指向/home/openEuler/os。 + + /mnt为已经创建好的repo源,/usr/share/nginx/repo/os将指向/mnt。 @@ -287,14 +285,14 @@ repo可配置为yum源,yum(全称为 Yellow dog Updater, Modified)是一 ``` [base] name=base - baseurl=http://192.168.1.2/ + baseurl=http://192.168.139.209/ enabled=1 gpgcheck=1 - gpgkey=http://192.168.1.2/RPM-GPG-KEY-openEuler + gpgkey=http://192.168.139.209/RPM-GPG-KEY-openEuler ``` >![](public_sys-resources/icon-note.gif) **说明:** - >“192.168.1.2”为示例地址,请用户根据实际情况进行配置。 + >“192.168.139.209”为示例地址,请用户根据实际情况进行配置。 ### repo优先级 @@ -304,11 +302,11 @@ repo可配置为yum源,yum(全称为 Yellow dog Updater, Modified)是一 ``` [base] name=base -baseurl=http://192.168.1.2/ +baseurl=http://192.168.139.209/ enabled=1 priority=2 gpgcheck=1 -gpgkey=http://192.168.1.2/RPM-GPG-KEY-openEuler +gpgkey=http://192.168.139.209/RPM-GPG-KEY-openEuler ``` >![](public_sys-resources/icon-note.gif) **说明:** diff --git "a/content/zh/docs/Administration/\346\220\255\345\273\272web\346\234\215\345\212\241\345\231\250.md" "b/content/zh/docs/Administration/\346\220\255\345\273\272web\346\234\215\345\212\241\345\231\250.md" index 3ed3aa10ef8ff8910734153d29b739551d5398b7..71d110b6199fa4373902d10ddebedc549cc32064 100644 --- "a/content/zh/docs/Administration/\346\220\255\345\273\272web\346\234\215\345\212\241\345\231\250.md" +++ "b/content/zh/docs/Administration/\346\220\255\345\273\272web\346\234\215\345\212\241\345\231\250.md" @@ -301,11 +301,11 @@ Web服务器搭建完成后,可以通过如下方式验证是否搭建成功 打开浏览器,在地址栏输入如下地址,如果能正常访问网页,说明httpd服务器搭建成功。 - https://192.168.1.60_ + http://192.168.1.60 如果修改了端口号,输入地址格式如下: - https://192.168.1.60:端口号 + http://192.168.1.60:端口号 @@ -549,7 +549,7 @@ Web服务器搭建完成后,可以通过如下方式验证是否搭建成功 打开浏览器,在地址栏输入如下地址,如果能正常访问网页,说明nginx服务器搭建成功。 - http://192.168.1.60_ + http://192.168.1.60 如果修改了端口号,输入地址格式如下: diff --git "a/content/zh/docs/Administration/\347\256\241\347\220\206\347\224\250\346\210\267.md" "b/content/zh/docs/Administration/\347\256\241\347\220\206\347\224\250\346\210\267\345\222\214\347\224\250\346\210\267\347\273\204.md" similarity index 61% rename from "content/zh/docs/Administration/\347\256\241\347\220\206\347\224\250\346\210\267.md" rename to "content/zh/docs/Administration/\347\256\241\347\220\206\347\224\250\346\210\267\345\222\214\347\224\250\346\210\267\347\273\204.md" index b6bbf692cc0774b682d6ba74e564527427d054fa..f207145e2f27c81a56a4999da2bc1637ef2d19a2 100644 --- "a/content/zh/docs/Administration/\347\256\241\347\220\206\347\224\250\346\210\267.md" +++ "b/content/zh/docs/Administration/\347\256\241\347\220\206\347\224\250\346\210\267\345\222\214\347\224\250\346\210\267\347\273\204.md" @@ -1,233 +1,343 @@ -# 管理用户 - -在Linux中,每个普通用户都有一个账户,包括用户名、密码和主目录等信息。除此之外,还有一些系统本身创建的特殊用户,它们具有特殊的意义,其中最重要的是管理员账户,默认用户名是root。同时Linux也提供了用户组,使每一个用户至少属于一个组,从而便于权限管理。 - -用户和用户组管理是系统安全管理的重要组成部分,本章主要介绍openEuler提供的用户管理和组管理命令,以及为普通用户分配特权的方法。 - - - -- [管理用户](#管理用户) - - [增加用户](#增加用户) - - [useradd命令](#useradd命令) - - [用户信息文件](#用户信息文件) - - [创建用户实例](#创建用户实例) - - [修改用户账号](#修改用户账号) - - [修改密码](#修改密码) - - [修改用户shell设置](#修改用户shell设置) - - [修改主目录](#修改主目录) - - [修改UID](#修改uid) - - [修改账号的有效期](#修改账号的有效期) - - [删除用户](#删除用户) - - [管理员账户授权](#管理员账户授权) - - - -## 增加用户 - -### useradd命令 - -在root权限下,通过useradd命令可以为系统添加新用户信息,其中 _options_ 为相关参数,_user\_name_ 为用户名称。 - -``` -useradd [options] user_name -``` - -### 用户信息文件 - -与用户账号信息有关的文件如下: - -- /etc/passwd:用户账号信息文件。 -- /etc/shadow:用户账号信息加密文件。 -- /etc/group:组信息文件。 -- /etc/default/useradd:定义默认设置文件。 -- /etc/login.defs:系统广义设置文件。 -- /etc/skel:默认的初始配置文件目录。 - -### 创建用户实例 - -例如新建一个用户名为user\_example的用户,在root权限下执行如下命令: - -``` -# useradd user_example -``` - ->![](public_sys-resources/icon-note.gif) **说明:** ->没有任何提示,表明用户建立成功。这时并没有设置用户的口令,请使用passwd命令修改用户的密码,没有设置密码的新账号不能登录系统。 - -使用id命令查看新建的用户信息,命令如下: - -``` -# id user_example -uid=502(user_example) gid=502(user_example) groups=502(user_example) -``` - -修改用户user\_example的密码: - -``` -# passwd user_example -``` - -根据提示两次输入新用户的密码,完成密码更改。过程如下: - -``` -# passwd user_example -Changing password for user user_example. -New password: -Retype new password: -passwd: all authentication tokens updated successfully. -``` - ->![](public_sys-resources/icon-note.gif) **说明:** ->若打印信息中出现“BAD PASSWORD: The password fails the dictionary check - it is too simplistic/sytematic”,表示设置的密码过于简单,建议设置复杂度较高的密码。 - -## 修改用户账号 - -### 修改密码 - -普通用户可以用passwd修改自己的密码,只有管理员才能用passwd username为其他用户修改密码。 - -### 修改用户shell设置 - -使用chsh命令可以修改自己的shell,只有管理员才能用chsh username为其他用户修改shell设置。 - -用户也可以使用usermod命令修改shell信息,在root权限下执行如下命令,其中 _new\_shell\_path_ 为目标shell路径,_username_ 为要修改用户的用户名,请根据实际情况修改: - -``` -usermod -s new_shell_path username -``` - -例如,将用户user\_example的shell改为csh,命令如下: - -``` -# usermod -s /bin/csh user_example -``` - -### 修改主目录 - -- 修改主目录,可以在root权限下执行如下命令,其中 _new\_home\_directory_ 为已创建的目标主目录的路径,_username_ 为要修改用户的用户名,请根据实际情况修改: - - ``` - usermod -d new_home_directory username - ``` - -- 如果想将现有主目录的内容转移到新的目录,应该使用-m选项,命令如下: - - ``` - usermod -d new_home_directory -m username - ``` - - -### 修改UID - -修改用户ID,在root权限下执行如下命令,其中 _UID_ 代表目标用户ID,_username_ 代表用户名,请根据实际情况修改: - -``` -usermod -u UID username -``` - -该用户主目录中所拥有的文件和目录都将自动修改UID设置。但是,对于主目录外所拥有的文件,只能使用chown命令手动修改所有权。 - -### 修改账号的有效期 - -如果使用了影子口令,则可以在root权限下,执行如下命令来修改一个账号的有效期,其中 _MM_ 代表月份,_DD_ 代表某天,_YY_ 代表年份,_username_ 代表用户名,请根据实际情况修改: - -``` -usermod -e MM/DD/YY username -``` - -## 删除用户 - -在root权限下,使用userdel命令可删除现有用户。 - -例如,删除用户Test,命令如下: - -``` -# userdel Test -``` - -如果想同时删除该用户的主目录以及其中所有内容,要使用-r参数递归删除。 - ->![](public_sys-resources/icon-note.gif) **说明:** ->不建议直接删除已经进入系统的用户,如果需要强制删除,请使用 userdel -f _Test_ 命令。 - -## 管理员账户授权 - -使用sudo命令可以允许普通用户执行管理员账户才能执行的命令。 - -sudo命令允许已经在/etc/sudoers文件中指定的用户运行管理员账户命令。例如,一个已经获得许可的普通用户可以运行如下命令: - -``` -sudo /usr/sbin/useradd newuserl -``` - -实际上,sudo的配置完全可以指定某个已经列入/etc/sudoers文件的普通用户可以做什么,不可以做什么。 - -/etc/sudoers的配置行如下所示。 - -- 空行或注释行(以\#字符打头):无具体功能的行。 -- 可选的主机别名行:用来创建主机列表的简称。必须以Host\_Alias关键词开头,列表中的主机必须用逗号隔开,如: - - ``` - Host_Alias linux=ted1,ted2 - ``` - - 其中ted1和ted2是两个主机名,可使用linux(别名)称呼它们。 - - -- 可选的用户别名行:用来创建用户列表的简称。用户别名行必须以User\_Alias关键词开头,列表中的用户名必须以逗号隔开。其格式同主机别名行。 -- 可选的命令别名行:用来创建命令列表的简称。必须以Cmnd\_Alias开头,列表中的命令必须用逗号隔开。 -- 可选的运行方式别名行:用来创建用户列表的简称。不同的是,使用这样的别名可以告诉sudo程序以列表中某一用户的身份来运行程序。 -- 必要的用户访问说明行。 - - 用户访问的说明语法如下: - - ``` - user host = [ run as user ] command list - ``` - - 在user处指定一个真正的用户名或定义过的别名,host也可以是一个真正的主机名或者定义过的主机别名。默认情况下,sudo执行的所有命令都是以root身份执行。如果您想使用其他身份可以指定。command list可以是以逗号分隔的命令列表,也可以是一个已经定义过的别名,如: - - ``` - ted1 ted2=/sbin/shutdown - ``` - - 这一句说明ted1可以在ted2主机上运行关机命令。 - - ``` - newuser1 ted1=(root) /usr/sbin/useradd,/usr/sbin/userdel - ``` - - 这一句说明ted1主机上的newuser1具有以root用户权限执行useradd,userdel命令的功能。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >- 可以在一行定义多个别名,中间用冒号 \(:\) 隔开。 - >- 可在命令或命令别名之前加上感叹号 \(!\),使该命令或命令别名无效。 - >- 有两个关键词:ALL和NOPASSWD。ALL意味着“所有”(所有文件、所有主机或所有命令),NOPASSWD意味着不用密码。 - >- 通过修改用户访问,将普通用户的访问权限修改为同root一样,则可以给普通用户分配特权。 - - -下面是一个sudoers文件的例子: - -``` -#sudoers files -#User alias specification -User_Alias ADMIN=ted1:POWERUSER=globus,ted2 -#user privilege specification -ADMIN ALL=ALL -POWERUSER ALL=ALL,!/bin/su -``` - -其中: - -- User\_Alias ADMIN=ted1:POWERUSER=globus,ted2 - - 定义了两个别名ADMIN和POWERUSER - -- ADMIN ALL=ALL - - 说明在所有主机上,ADMIN用户都可以以root身份执行所有命令 - -- POWERUSER ALL=ALL,!/bin/su - - 给POWERUSER用户除了运行su命令外等同ADMIN的权限 - +# 管理用户 + +在Linux中,每个普通用户都有一个账户,包括用户名、密码和主目录等信息。除此之外,还有一些系统本身创建的特殊用户,它们具有特殊的意义,其中最重要的是管理员账户,默认用户名是root。同时Linux也提供了用户组,使每一个用户至少属于一个组,从而便于权限管理。 + +用户和用户组管理是系统安全管理的重要组成部分,本章主要介绍openEuler提供的用户管理和组管理命令,以及为普通用户分配特权的方法。 + + + +- [管理用户](#管理用户) + - [管理用户](#管理用户-1) + - [增加用户](#增加用户) + - [修改用户账号](#修改用户账号) + - [删除用户](#删除用户) + - [管理员账户授权](#管理员账户授权) + - [管理用户组](#管理用户组) + - [增加用户组](#增加用户组) + - [修改用户组](#修改用户组) + - [删除用户组](#删除用户组) + - [将用户加入用户组或从用户组中移除](#将用户加入用户组或从用户组中移除) + - [切换用户组](#切换用户组) + + + +## 管理用户 + +### 增加用户 + +#### useradd命令 + +在root权限下,通过useradd命令可以为系统添加新用户信息,其中 _options_ 为相关参数, _username_ 为用户名称。 + +``` +useradd [options] username +``` + +#### 用户信息文件 + +与用户账号信息有关的文件如下: + +- /etc/passwd:用户账号信息文件。 +- /etc/shadow:用户账号信息加密文件。 +- /etc/group:组信息文件。 +- /etc/default/useradd:定义默认设置文件。 +- /etc/login.defs:系统广义设置文件。 +- /etc/skel:默认的初始配置文件目录。 + +#### 创建用户实例 + +例如新建一个用户名为userexample的用户,在root权限下执行如下命令: + +``` +# useradd userexample +``` + +>![](public_sys-resources/icon-note.gif) **说明:** +>没有任何提示,表明用户建立成功。这时并没有设置用户的口令,请使用passwd命令修改用户的密码,没有设置密码的新账号不能登录系统。 + + +使用id命令查看新建的用户信息,命令如下: + +``` +# id userexample +uid=502(userexample) gid=502(userexample) groups=502(userexample) +``` + +修改用户userexample的密码: + +``` +# passwd userexample +``` + +修改用户密码时需要满足密码复杂度要求,密码的复杂度的要求如下: + +1. 口令长度至少8个字符。 +2. 口令至少包含大写字母、小写字母、数字和特殊字符中的任意3种。 +3. 口令不能和账号一样。 +4. 口令不能使用字典词汇。 + - 查询字典 + 在已装好的openEuler环境中,可以通过如下命令导出字典库文件dictionary.txt,用户可以查询密码是否在该字典中。 + ``` + cracklib-unpacker /usr/share/cracklib/pw_dict > dictionary.txt + ``` + - 修改字典 + 1. 修改上面导出的字典文件,执行如下命令更新系统字典库。 + ``` + # create-cracklib-dict dictionary.txt + ``` + 2. 在原字典库基础上新增其他字典内容custom.txt。 + ``` + # create-cracklib-dict dictionary.txt custom.txt + ``` + + +根据提示两次输入新用户的密码,完成密码更改。过程如下: + +``` +# passwd userexample +Changing password for user userexample. +New password: +Retype new password: +passwd: all authentication tokens updated successfully. +``` + +>![](public_sys-resources/icon-note.gif) **说明:** +>若打印信息中出现“BAD PASSWORD: The password fails the dictionary check - it is too simplistic/sytematic”,表示设置的密码过于简单,建议设置复杂度较高的密码。 + +### 修改用户账号 + +#### 修改密码 + +普通用户可以用passwd修改自己的密码,只有管理员才能用passwd username为其他用户修改密码。 + +#### 修改用户shell设置 + +使用chsh命令可以修改自己的shell,只有管理员才能用chsh username为其他用户修改shell设置。 + +用户也可以使用usermod命令修改shell信息,在root权限下执行如下命令,其中 _new\_shell\_path_ 为目标shell路径,_username_ 为要修改用户的用户名,请根据实际情况修改: + +``` +usermod -s new_shell_path username +``` + +例如,将用户userexample的shell改为csh,命令如下: + +``` +# usermod -s /bin/csh userexample +``` + +#### 修改主目录 + +- 修改主目录,可以在root权限下执行如下命令,其中 _new\_home\_directory_ 为已创建的目标主目录的路径,_username_ 为要修改用户的用户名,请根据实际情况修改: + + ``` + usermod -d new_home_directory username + ``` + +- 如果想将现有主目录的内容转移到新的目录,应该使用-m选项,命令如下: + + ``` + usermod -d new_home_directory -m username + ``` + + +#### 修改UID + +修改用户ID,在root权限下执行如下命令,其中 _UID_ 代表目标用户ID,_username_ 代表用户名,请根据实际情况修改: + +``` +usermod -u UID username +``` + +该用户主目录中所拥有的文件和目录都将自动修改UID设置。但是,对于主目录外所拥有的文件,只能使用chown命令手动修改所有权。 + +#### 修改账号的有效期 + +如果使用了影子口令,则可以在root权限下,执行如下命令来修改一个账号的有效期,其中 _MM_ 代表月份,_DD_ 代表某天,_YY_ 代表年份,_username_ 代表用户名,请根据实际情况修改: + +``` +usermod -e MM/DD/YY username +``` + +### 删除用户 + +在root权限下,使用userdel命令可删除现有用户。 + +例如,删除用户Test,命令如下: + +``` +# userdel Test +``` + +如果想同时删除该用户的主目录以及其中所有内容,要使用-r参数递归删除。 + +>![](public_sys-resources/icon-note.gif) **说明:** +>不建议直接删除已经进入系统的用户,如果需要强制删除,请使用 userdel -f _Test_ 命令。 + +### 管理员账户授权 + +使用sudo命令可以允许普通用户执行管理员账户才能执行的命令。 + +sudo命令允许已经在/etc/sudoers文件中指定的用户运行管理员账户命令。例如,一个已经获得许可的普通用户可以运行如下命令: + +``` +sudo /usr/sbin/useradd newuserl +``` + +实际上,sudo的配置完全可以指定某个已经列入/etc/sudoers文件的普通用户可以做什么,不可以做什么。 + +/etc/sudoers的配置行如下所示。 + +- 空行或注释行(以\#字符打头):无具体功能的行。 +- 可选的主机别名行:用来创建主机列表的简称。必须以Host\_Alias关键词开头,列表中的主机必须用逗号隔开,如: + + ``` + Host_Alias linux=ted1,ted2 + ``` + + 其中ted1和ted2是两个主机名,可使用linux(别名)称呼它们。 + + +- 可选的用户别名行:用来创建用户列表的简称。用户别名行必须以User\_Alias关键词开头,列表中的用户名必须以逗号隔开。其格式同主机别名行。 +- 可选的命令别名行:用来创建命令列表的简称。必须以Cmnd\_Alias开头,列表中的命令必须用逗号隔开。 +- 可选的运行方式别名行:用来创建用户列表的简称。不同的是,使用这样的别名可以告诉sudo程序以列表中某一用户的身份来运行程序。 +- 必要的用户访问说明行。 + + 用户访问的说明语法如下: + + ``` + user host = [ run as user ] command list + ``` + + 在user处指定一个真正的用户名或定义过的别名,host也可以是一个真正的主机名或者定义过的主机别名。默认情况下,sudo执行的所有命令都是以root身份执行。如果您想使用其他身份可以指定。command list可以是以逗号分隔的命令列表,也可以是一个已经定义过的别名,如: + + ``` + ted1 ted2=/sbin/shutdown + ``` + + 这一句说明ted1可以在ted2主机上运行关机命令。 + + ``` + newuser1 ted1=(root) /usr/sbin/useradd,/usr/sbin/userdel + ``` + + 这一句说明ted1主机上的newuser1具有以root用户权限执行useradd,userdel命令的功能。 + + >![](public_sys-resources/icon-note.gif) **说明:** + >- 可以在一行定义多个别名,中间用冒号 \(:\) 隔开。 + >- 可在命令或命令别名之前加上感叹号 \(!\),使该命令或命令别名无效。 + >- 有两个关键词:ALL和NOPASSWD。ALL意味着“所有”(所有文件、所有主机或所有命令),NOPASSWD意味着不用密码。 + >- 通过修改用户访问,将普通用户的访问权限修改为同root一样,则可以给普通用户分配特权。 + + +下面是一个sudoers文件的例子: + +``` +#sudoers files +#User alias specification +User_Alias ADMIN=ted1:POWERUSER=globus,ted2 +#user privilege specification +ADMIN ALL=ALL +POWERUSER ALL=ALL,!/bin/su +``` + +其中: + +- User\_Alias ADMIN=ted1:POWERUSER=globus,ted2 + + 定义了两个别名ADMIN和POWERUSER + +- ADMIN ALL=ALL + + 说明在所有主机上,ADMIN用户都可以以root身份执行所有命令 + +- POWERUSER ALL=ALL,!/bin/su + + 给POWERUSER用户除了运行su命令外等同ADMIN的权限 + +## 管理用户组 + +### 增加用户组 + +#### groupadd命令 + +在root权限下,通过groupadd命令可以为系统添加新用户组信息,其中 _options_ 为相关参数, _groupname_ 为用户组名称。 + +``` +groupadd [options] groupname +``` + +#### 用户组信息文件 + +与用户组信息有关的文件如下: + +- /etc/gshadow:用户组信息加密文件。 +- /etc/group:组信息文件。 +- /etc/login.defs:系统广义设置文件。 + +#### 创建用户组实例 + +例如新建一个用户组名为groupexample的用户,在root权限下执行如下命令: + +``` +# groupadd groupexample +``` + +### 修改用户组 + +#### 修改GID + +修改用户组ID,在root权限下执行如下命令,其中 _GID_ 代表目标用户组ID, _groupname_ 代表用户组,请根据实际情况修改: + +``` +groupmod -g GID groupname +``` + + +#### 修改用户组名 + +修改用户组名,在root权限下执行如下命令,其中 _newgroupname_ 代表新用户组名, _oldgroupname_ 代表已经存在的待修改的用户组名,请根据实际情况修改: + +``` +groupmod -n newgroupname oldgroupname +``` + +### 删除用户组 + +在root权限下,使用groupdel命令可删除用户组。 + +例如,删除用户组Test,命令如下: + +``` +# groupdel Test +``` + +>![](public_sys-resources/icon-note.gif) **说明:** +>groupdel不能直接删除用户的主组,如果需要强制删除用户主组,请使用 groupdel -f _Test_ 命令。 + +### 将用户加入用户组或从用户组中移除 + +在root权限下,使用gpasswd命令将用户加入用户组或从用户组中移除。 + +例如,将用户 _userexample_ 加入用户组 _Test_ ,命令如下: + +``` +# gpasswd -a userexample Test +``` +例如,将用户 _userexample_ 从 _Test_ 用户组中移除,命令如下: + +``` +# gpasswd -d userexample Test +``` + +### 切换用户组 + +一个用户同时属于多个用户组时,则在用户登录后,使用newgrp命令可以切换到其他用户组,以便具有其他用户组的权限。 + +例如,将用户 _userexample_ 切换到 _Test_ 用户组,命令如下: + +``` +$ newgrp Test +``` + + diff --git "a/content/zh/docs/ApplicationDev/\346\236\204\345\273\272RPM\345\214\205.md" "b/content/zh/docs/ApplicationDev/\346\236\204\345\273\272RPM\345\214\205.md" index e77dab84c84b5fa9aa5c54ced3431997ba0b4438..4fb7fbeacc8b7b928f5d9adc9d94646a489006a7 100644 --- "a/content/zh/docs/ApplicationDev/\346\236\204\345\273\272RPM\345\214\205.md" +++ "b/content/zh/docs/ApplicationDev/\346\236\204\345\273\272RPM\345\214\205.md" @@ -515,7 +515,7 @@ OBS使用工程组织软件包。基础的权限控制、相关的存仓库和 使用OBS网页端,修改已有软件的源代码,并将修改后的源文件构建为RPM软件包的操作方法如下: -1. 登录OBS界面,地址为:[http://openeuler-build.huawei.com/](http://openeuler-build.huawei.com/)。 +1. 登录OBS界面,地址为:[https://build.openeuler.org/](https://build.openeuler.org/)。 2. 单击“All Projects”进入所有工程页面。 3. 单击需要修改的对应工程,进入该工程的详情页面,例如单击“openEuler:Mainline”。 4. 在工程详情页面的搜索框查找需要修改的软件包,然后单击该软件包包名,进入该软件包详请页面。 @@ -639,12 +639,12 @@ RPM软件包构建完成后,通过网页端获取对应RPM软件包的方法 $ vi ~/.oscrc ``` - 2. 在\~/.oscrc中添加user和pass字段,如下所示,它们的取值 _userName_ 和 _passWord_ 分别是用户在OBS网页([http://openeuler-build.huawei.com/](http://openeuler-build.huawei.com/))上已经注册的账号和密码。 + 2. 在\~/.oscrc中添加user和pass字段,如下所示,它们的取值 _userName_ 和 _passWord_ 分别是用户在OBS网页([https://build.openeuler.org/](https://build.openeuler.org/))上已经注册的账号和密码。 ``` [general] - apiurl = http://openeuler-build.huawei.com/ - [http://openeuler-build.huawei.com/] + apiurl = https://build.openeuler.org/ + [https://build.openeuler.org/] user=userName pass=passWord ``` diff --git a/content/zh/menu/index.md b/content/zh/menu/index.md index 2a748f0fe8e3207e98ef27ea11f37201996b7414..9883614d3336d59195b58d61fa0ed7643353ccde 100644 --- a/content/zh/menu/index.md +++ b/content/zh/menu/index.md @@ -26,7 +26,7 @@ headless: true - [管理员指南]({{< relref "./docs/Administration/administration.md" >}}) - [查看系统信息]({{< relref "./docs/Administration/查看系统信息.md" >}}) - [基础配置]({{< relref "./docs/Administration/基础配置.md" >}}) - - [管理用户]({{< relref "./docs/Administration/管理用户.md" >}}) + - [管理用户和用户组]({{< relref "./docs/Administration/管理用户和用户组.md" >}}) - [使用DNF管理软件包]({{< relref "./docs/Administration/使用DNF管理软件包.md" >}}) - [管理服务]({{< relref "./docs/Administration/管理服务.md" >}}) - [管理进程]({{< relref "./docs/Administration/管理进程.md" >}})