#1 first pass at module
Merged 6 years ago by aneta. Opened 6 years ago by ssitani.
fedora-docs/ ssitani/flock2017-docs-workshop assembly  into  master

@@ -20,13 +20,37 @@ 

  

  * Text can be a link to a pre-requisite task that the user must do before starting this task.

  

- include::procedure-creating_a_directory.adoc[leveloffset=+1]

+ // prerequisite

+ include::concept-what_is_a_user.adoc[leveloffset+1]

  

- include::procedure-creating_a_user_group.adoc[leveloffset=+1]

+ // prerequisite

+ include::concept-what_is_a_group.adoc[leveloffset+1]

  

- include::procedure-chown_chmod_on_directory_for_user_group.adoc[leveloffset=+1]

+ .Procedure

  

- include::procedure-adding_users_to_user_groups.adoc[leveloffset=+1]

+ This section describes how to create a shared directory accessible only to members of a specific user group.

+ 

+ * Sentence or a bulleted list of pre-requisites that must be in place or done before the user starts this task.

+ 

+ * Delete section title and bullets if the task has no required pre-requisites.

+ 

+ * Text can be a link to a pre-requisite task that the user must do before starting this task.

+ 

+ // Create a user group.

+ // include::en-US/sysadmin_user_stories/procedure-creating_a_user_group.adoc[leveloffset+1]

+ include::procedure-creating_a_user_group.adoc[leveloffset+1]

+ +

+ // Add the new user to the group.

+ // include::en-US/sysadmin_user_stories/procedure-adding_users_to_user_groups.adoc[leveloffset+1]

+ include::procedure-adding_users_to_user_groups.adoc[leveloffset+1]

+ +

+ // Creating a directory

+ // include::en-US/sysadmin_user_stories/procedure-creating_a_directory.adoc[leveloffset+1]

+ include::procedure-creating_a_directory.adoc[leveloffset+1]

+ +

+ // Changing ownership of a directory to a user group.

+ // include::en-US/sysadmin_user_stories/procedure-chown_chmod_on_director_for_user_group.adoc[leveloffset+1]

+ include::procedure-chown_chmod_on_directory_for_user_group.adoc[leveloffset+1]

  

  == Additional Resources

  
@@ -35,3 +59,7 @@ 

  * Include only the most relevant items as links, not every possible related item.

  

  * Delete section title and bullets if no related information is needed.

+ 

+ include::reference-useradd_command_line_options.adoc[leveloffset=+1]

+ 

+ include::reference-useradd_command_line_options.adoc[leveloffset=+1]

@@ -1,22 +1,19 @@ 

  // Include an 'ID' that corresponds to the title of the assembly

  // The ID will be used as an anchor for linking to the title

  // Do not change the ID to make sure existing links keep working

- [#concept_template_and_guidelines]

- = Concept Template and Guidelines

  

- _In the title, include nouns that are used in the body text -- this helps readers and search engines find information quickly._

+ // locally defined replaceable

+ :MAJOROS: Fedora

+ 

+ [#concept_what_is_a_user]

+ = What Is a Group?

  

  // Ideally, base the name of the file on the title to avoid confusion

  // Use a consistent system for filenames and IDs, e.g.:

  //  * Only substitute spaces with underscores

  //  * Don't use any CAPS

  

- A concept module describes and explains things such as a product, subsystem, or feature -- what a customer needs to understand to do a task. A concept module may also explain how things relate and interact with other things. The use of graphics and diagrams can speed up understanding of a concept.

- 

- * Look at nouns and noun phrases in related task modules and user story assemblies to find the concepts to explain to users.

- 

- * A concept module in product documentation should explain only things that are visible to users.

- 

- * If a product concept is interesting, but not visible to users, the concept probably does not require explanation in a concept module.

+ Groups are logical expressions of organization, tying users together for a common purpose. Users within a group share the same permissions to read, write, or execute files owned by that group.

+ Each group is associated with a _group ID_ (*GID*).

  

- * A concept module should NOT include numbered steps or other wording that instructs a user to execute a command or perform an action. Instead, put that information in a separate task module or user story assembly.

+ Additionally, {MAJOROS} supports _access control lists_ (*ACLs*) for files and directories which allow permissions for specific users outside of the owner to be set. For more information about this feature, see the link:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Access_Control_Lists.html[_Access Control Lists_] chapter of the link:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/index.html[_Red Hat Enterprise Linux 7 System Administrators Guide_].

@@ -1,22 +1,13 @@ 

  // Include an 'ID' that corresponds to the title of the assembly

  // The ID will be used as an anchor for linking to the title

  // Do not change the ID to make sure existing links keep working

- [#concept_template_and_guidelines]

- = Concept Template and Guidelines

  

- _In the title, include nouns that are used in the body text -- this helps readers and search engines find information quickly._

+ [#concept_what_is_a_user]

  

- // Ideally, base the name of the file on the title to avoid confusion

- // Use a consistent system for filenames and IDs, e.g.:

- //  * Only substitute spaces with underscores

- //  * Don't use any CAPS

+ = What Is a User?

  

- A concept module describes and explains things such as a product, subsystem, or feature -- what a customer needs to understand to do a task. A concept module may also explain how things relate and interact with other things. The use of graphics and diagrams can speed up understanding of a concept.

+ Users can be either people (meaning accounts tied to physical users) or accounts which exist for specific applications to use.

  

- * Look at nouns and noun phrases in related task modules and user story assemblies to find the concepts to explain to users.

+ Each user is associated with a unique numerical identification number called a _user ID_ (*UID*).

  

- * A concept module in product documentation should explain only things that are visible to users.

- 

- * If a product concept is interesting, but not visible to users, the concept probably does not require explanation in a concept module.

- 

- * A concept module should NOT include numbered steps or other wording that instructs a user to execute a command or perform an action. Instead, put that information in a separate task module or user story assembly.

+ A user who creates a file is also the owner and group owner of that file. The file is assigned separate read, write, and execute permissions for the owner, the group, and everyone else. The file owner can be changed only by `root`, and access permissions can be changed by both the `root` user and file owner.

@@ -1,48 +1,11 @@ 

  // Include an 'ID' that corresponds to the title of the assembly

  // The ID will be used as an anchor for linking to the title

  // Do not change the ID to make sure existing links keep working

- [#doing_one_task]

- = Doing One Task

- 

- _Start the title with a verb form, such as Creating or Create._

- 

- _A task module is a procedure written with numbered steps -- what a customer needs to do to accomplish a goal successfully._

- 

- // Ideally, base the name of the file on the title to avoid confusion

- // Use a consistent system for filenames and IDs, e.g.:

- //  * Only substitute spaces with underscores

- //  * Don't use any CAPS

- 

- This paragraph explains why the user performs the task, sets the context of the task, and may explain or list specical considerations specific to this task. Keep the information brief and focused on what is needed for this specific task. Suggested length is 1 to 3 sentences, can be longer if needed.

- 

- .Prerequisites

- 

- * Sentence or a bulleted list of pre-requisites that must be in place or done before the user starts this task.

- 

- * Delete section title and bullets if the task has no required pre-requisites.

- 

- * Text can be a link to a pre-requisite task that the user must do before starting this task.

- 

- 

- .Procedure

- 

- _Put steps in a numbered list. The step sequence is important to a repeatable successful outcome._

- 

- . Start each step with an active verb, because each step corresponds to one user action.

- 

- . Include one command or action per step.

- 

- . Format the step line as an unnumbered bullet if the procedure includes only 1 step (exception to numbering the steps).

- 

- . Include one command or action per step.

- 

- . Include one command or action per step.

- 

- 

- .Related Information

- 

- * Bulleted list of links to concepts, reference, or other tasks closely related to this task.

- 

- * Include only the most relevant items as links, not every possible related item.

- 

- * Delete section title and bullets if no related information is needed.

+ [#adding_users_to_user_groups]

+ 

+ . Add users to the your new user group:

+ +

+ [subs="quotes, macros"]

+ ----

+ usermod -aG myproject _username_

+ ----

@@ -1,48 +1,24 @@ 

  // Include an 'ID' that corresponds to the title of the assembly

  // The ID will be used as an anchor for linking to the title

  // Do not change the ID to make sure existing links keep working

- [#doing_one_task]

- = Doing One Task

- 

- _Start the title with a verb form, such as Creating or Create._

- 

- _A task module is a procedure written with numbered steps -- what a customer needs to do to accomplish a goal successfully._

- 

- // Ideally, base the name of the file on the title to avoid confusion

- // Use a consistent system for filenames and IDs, e.g.:

- //  * Only substitute spaces with underscores

- //  * Don't use any CAPS

- 

- This paragraph explains why the user performs the task, sets the context of the task, and may explain or list specical considerations specific to this task. Keep the information brief and focused on what is needed for this specific task. Suggested length is 1 to 3 sentences, can be longer if needed.

- 

- .Prerequisites

- 

- * Sentence or a bulleted list of pre-requisites that must be in place or done before the user starts this task.

- 

- * Delete section title and bullets if the task has no required pre-requisites.

- 

- * Text can be a link to a pre-requisite task that the user must do before starting this task.

- 

- 

- .Procedure

- 

- _Put steps in a numbered list. The step sequence is important to a repeatable successful outcome._

- 

- . Start each step with an active verb, because each step corresponds to one user action.

- 

- . Include one command or action per step.

- 

- . Format the step line as an unnumbered bullet if the procedure includes only 1 step (exception to numbering the steps).

- 

- . Include one command or action per step.

- 

- . Include one command or action per step.

- 

- 

- .Related Information

- 

- * Bulleted list of links to concepts, reference, or other tasks closely related to this task.

- 

- * Include only the most relevant items as links, not every possible related item.

- 

- * Delete section title and bullets if no related information is needed.

+ [#chmod_chown_on_directory_for_user_group]

+ . Associate the contents of the `/opt/myproject/` directory with the `myproject` group:

+ +

+ [subs="quotes, macros"]

+ ----

+ [command]#chown root:myproject /opt/myproject#

+ ----

+ . Allow users in the group to create files within the directory and set the `setgid` bit:

+ +

+ [subs="quotes, macros"]

+ ----

+ [command]#chmod 2775 /opt/myproject#

+ ----

+ +

+ At this point, all members of the `myproject` group can create and edit files in the `/opt/myproject/` directory without the administrator having to change file permissions every time users write new files. To verify that the permissions have been set correctly, run the following command:

+ +

+ [subs="attributes"]

+ ----

+ ~]#{nbsp}ls -ld /opt/myproject

+ drwxrwsr-x. 3 root myproject 4096 Mar  3 18:31 /opt/myproject

+ ----

@@ -2,47 +2,10 @@ 

  // The ID will be used as an anchor for linking to the title

  // Do not change the ID to make sure existing links keep working

  [#doing_one_task]

- = Doing One Task

  

- _Start the title with a verb form, such as Creating or Create._

- 

- _A task module is a procedure written with numbered steps -- what a customer needs to do to accomplish a goal successfully._

- 

- // Ideally, base the name of the file on the title to avoid confusion

- // Use a consistent system for filenames and IDs, e.g.:

- //  * Only substitute spaces with underscores

- //  * Don't use any CAPS

- 

- This paragraph explains why the user performs the task, sets the context of the task, and may explain or list specical considerations specific to this task. Keep the information brief and focused on what is needed for this specific task. Suggested length is 1 to 3 sentences, can be longer if needed.

- 

- .Prerequisites

- 

- * Sentence or a bulleted list of pre-requisites that must be in place or done before the user starts this task.

- 

- * Delete section title and bullets if the task has no required pre-requisites.

- 

- * Text can be a link to a pre-requisite task that the user must do before starting this task.

- 

- 

- .Procedure

- 

- _Put steps in a numbered list. The step sequence is important to a repeatable successful outcome._

- 

- . Start each step with an active verb, because each step corresponds to one user action.

- 

- . Include one command or action per step.

- 

- . Format the step line as an unnumbered bullet if the procedure includes only 1 step (exception to numbering the steps).

- 

- . Include one command or action per step.

- 

- . Include one command or action per step.

- 

- 

- .Related Information

- 

- * Bulleted list of links to concepts, reference, or other tasks closely related to this task.

- 

- * Include only the most relevant items as links, not every possible related item.

- 

- * Delete section title and bullets if no related information is needed.

+ . As `root`, create the `/opt/myproject/` directory by typing the following at a shell prompt:

+ +

+ [subs="quotes, macros"]

+ ----

+ [command]#mkdir /opt/myproject#

+ ----

@@ -1,48 +1,10 @@ 

  // Include an 'ID' that corresponds to the title of the assembly

  // The ID will be used as an anchor for linking to the title

  // Do not change the ID to make sure existing links keep working

- [#doing_one_task]

- = Doing One Task

- 

- _Start the title with a verb form, such as Creating or Create._

- 

- _A task module is a procedure written with numbered steps -- what a customer needs to do to accomplish a goal successfully._

- 

- // Ideally, base the name of the file on the title to avoid confusion

- // Use a consistent system for filenames and IDs, e.g.:

- //  * Only substitute spaces with underscores

- //  * Don't use any CAPS

- 

- This paragraph explains why the user performs the task, sets the context of the task, and may explain or list specical considerations specific to this task. Keep the information brief and focused on what is needed for this specific task. Suggested length is 1 to 3 sentences, can be longer if needed.

- 

- .Prerequisites

- 

- * Sentence or a bulleted list of pre-requisites that must be in place or done before the user starts this task.

- 

- * Delete section title and bullets if the task has no required pre-requisites.

- 

- * Text can be a link to a pre-requisite task that the user must do before starting this task.

- 

- 

- .Procedure

- 

- _Put steps in a numbered list. The step sequence is important to a repeatable successful outcome._

- 

- . Start each step with an active verb, because each step corresponds to one user action.

- 

- . Include one command or action per step.

- 

- . Format the step line as an unnumbered bullet if the procedure includes only 1 step (exception to numbering the steps).

- 

- . Include one command or action per step.

- 

- . Include one command or action per step.

- 

- 

- .Related Information

- 

- * Bulleted list of links to concepts, reference, or other tasks closely related to this task.

- 

- * Include only the most relevant items as links, not every possible related item.

- 

- * Delete section title and bullets if no related information is needed.

+ [#creating_a_user_group]

+ . Create the `myproject` group by typing the following at a shell prompt as `root`:

+ +

+ [subs="macros,quotes"]

+ ----

+ groupadd _options_ myproject

+ ----

@@ -1,48 +1,10 @@ 

  // Include an 'ID' that corresponds to the title of the assembly

  // The ID will be used as an anchor for linking to the title

  // Do not change the ID to make sure existing links keep working

- [#doing_one_task]

- = Doing One Task

- 

- _Start the title with a verb form, such as Creating or Create._

- 

- _A task module is a procedure written with numbered steps -- what a customer needs to do to accomplish a goal successfully._

- 

- // Ideally, base the name of the file on the title to avoid confusion

- // Use a consistent system for filenames and IDs, e.g.:

- //  * Only substitute spaces with underscores

- //  * Don't use any CAPS

- 

- This paragraph explains why the user performs the task, sets the context of the task, and may explain or list specical considerations specific to this task. Keep the information brief and focused on what is needed for this specific task. Suggested length is 1 to 3 sentences, can be longer if needed.

- 

- .Prerequisites

- 

- * Sentence or a bulleted list of pre-requisites that must be in place or done before the user starts this task.

- 

- * Delete section title and bullets if the task has no required pre-requisites.

- 

- * Text can be a link to a pre-requisite task that the user must do before starting this task.

- 

- 

- .Procedure

- 

- _Put steps in a numbered list. The step sequence is important to a repeatable successful outcome._

- 

- . Start each step with an active verb, because each step corresponds to one user action.

- 

- . Include one command or action per step.

- 

- . Format the step line as an unnumbered bullet if the procedure includes only 1 step (exception to numbering the steps).

- 

- . Include one command or action per step.

- 

- . Include one command or action per step.

- 

- 

- .Related Information

- 

- * Bulleted list of links to concepts, reference, or other tasks closely related to this task.

- 

- * Include only the most relevant items as links, not every possible related item.

- 

- * Delete section title and bullets if no related information is needed.

+ [#adding_a_new_user]

+ . Add a new user by typing the following at a shell prompt as  `root`:

+ +

+ [subs="quotes, macros"]

+ ----

+ useradd _options_ _username_

+ ----

@@ -0,0 +1,12 @@ 

+ [[table-groupadd-options]]

+ .Common groupadd command-line options

+ [options="header"]

+ |===

+ |Option|Description

+ |[option]`-f`, [option]`--force`|When used with [option]`-g`pass:attributes[{blank}] pass:attributes[{blank}]_gid_ and _gid_ already exists, [command]#groupadd# will choose another unique _gid_ for the group.

+ |[option]`-g`pass:attributes[{blank}] pass:attributes[{blank}]_gid_|Group ID for the group, which must be unique and greater than 999.

+ |[option]`-K`, [option]`--key`pass:attributes[{blank}] pass:attributes[{blank}]_key_pass:attributes[{blank}]=pass:attributes[{blank}]_value_|Override `/etc/login.defs` defaults.

+ |[option]`-o`, [option]`--non-unique`|Allows creating groups with duplicate GID.

+ |[option]`-p`, [option]`--password`pass:attributes[{blank}] pass:attributes[{blank}]_password_|Use this encrypted password for the new group.

+ |[option]`-r`|Create a system group with a GID less than 1000.

+ |===

@@ -0,0 +1,20 @@ 

+ [[table-useradd-options]]

+ 

+ .Common useradd command-line options

+ [options="header"]

+ |===

+ |Option|Description

+ |[option]`-c`pass:attributes[{blank}] 'pass:attributes[{blank}]_comment_pass:attributes[{blank}]'|_comment_ can be replaced with any string. This option is generally used to specify the full name of a user.

+ |[option]`-d`pass:attributes[{blank}] pass:attributes[{blank}]_home_directory_|Home directory to be used instead of default `/home/pass:attributes[{blank}]_username_pass:attributes[{blank}]/`.

+ |[option]`-e`pass:attributes[{blank}] pass:attributes[{blank}]_date_|Date for the account to be disabled in the format YYYY-MM-DD.

+ |[option]`-f`pass:attributes[{blank}] pass:attributes[{blank}]_days_|Number of days after the password expires until the account is disabled. If `0` is specified, the account is disabled immediately after the password expires. If `-1` is specified, the account is not disabled after the password expires.

+ |[option]`-g`pass:attributes[{blank}] pass:attributes[{blank}]_group_name_|Group name or group number for the user's default (primary) group. The group must exist prior to being specified here.

+ |[option]`-G`pass:attributes[{blank}] pass:attributes[{blank}]_group_list_|List of additional (supplementary, other than default) group names or group numbers, separated by commas, of which the user is a member. The groups must exist prior to being specified here.

+ |[option]`-m`|Create the home directory if it does not exist.

+ |[option]`-M`|Do not create the home directory.

+ |[option]`-N`|Do not create a user private group for the user.

+ |[option]`-p`pass:attributes[{blank}] pass:attributes[{blank}]_password_|The password encrypted with [command]#crypt#.

+ |[option]`-r`|Create a system account with a UID less than 1000 and without a home directory.

+ |[option]`-s`|User's login shell, which defaults to [command]#/bin/bash#.

+ |[option]`-u`pass:attributes[{blank}] pass:attributes[{blank}]_uid_|User ID for the user, which must be unique and greater than 999.

+ |===

no initial comment

@bex, could you clarify, please? You mean work w/ Stefan to have it mergreable?

Yes. Or at least confirm it should be merged.

@rkratky if you don't mind, I'll take this. I can talk to Štefan in person and resolve the things that probably need fixing.

rebased

6 years ago

1 new commit added

  • populate procedure modules with commands and examples
6 years ago

rebased

6 years ago

rebased

6 years ago

Pull-Request has been merged by aneta

6 years ago