Skip to content

Commit 52008a2

Browse files
lab8-samba.md (#2088)
Grammar Check
1 parent 05849e4 commit 52008a2

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

docs/labs/networking/lab8-samba.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
author: Wale Soyinka
3-
contributors:
3+
contributors: Ganna Zhyrnova
44
tested on: All Versions
55
tags:
66
- samba
@@ -29,12 +29,12 @@ Estimated time to complete this lab: 40 minutes
2929

3030
Samba allows for file sharing and printing services between Unix/Linux and Windows systems.
3131

32-
Samba is an open source implementation of the “Common Internet File System” (CIFS). CIFS is also referred to as the Server Message Block (SMB), Lan Manager or NETBIOS protocol.
33-
The Samba server comprises of two main daemons – smbd and nmbd.
32+
Samba is an open-source “Common Internet File System” (CIFS) implementation. CIFS is also referred to as the Server Message Block (SMB), LAN manager, or NetBIOS protocol.
33+
The Samba server comprises two main daemons – smbd and nmbd.
3434

35-
*smbd* : This daemon provides the file and print services to SMB clients, such as machines running various Microsoft operating systems.
35+
*smbd*: This daemon provides file and print services to SMB clients, such as machines running various Microsoft operating systems.
3636

37-
*nmbd* : This daemon provides NETBIOS name serving and browsing support.
37+
*nmbd*: This daemon provides NETBIOS name serving and browsing support.
3838

3939

4040
The exercises in this lab focus on setting up Samba as both a server and a client on a Rocky Linux server.
@@ -54,7 +54,7 @@ The exercises in this lab focus on setting up Samba as both a server and a clien
5454

5555
#### To configure Samba
5656

57-
1. Create a directory to be shared named samba-share under the /tmp folder. Type:
57+
1. Create a directory named samba-share under the /tmp folder to be shared. Type:
5858

5959
```bash
6060
mkdir /tmp/samba-share
@@ -91,13 +91,13 @@ The exercises in this lab focus on setting up Samba as both a server and a clien
9191
9292
### Samba users
9393
94-
An important and common administrative task for managing a Samba server is creating users, creating passwords for users that need to access the shared resources.
94+
An important and common administrative task for managing a Samba server is creating users and passwords for users who need to access the shared resources.
9595
9696
This exercise shows how to create Samba users and set up access credentials for the users.
9797
98-
#### To create a Samba user and samba password
98+
#### To create a Samba user and Samba password
9999
100-
1. First create a regular system user named sambarockstar. Type:
100+
1. First, create a regular system user named sambarockstar. Type:
101101
102102
```bash
103103
sudo useradd sambarockstar
@@ -107,8 +107,7 @@ This exercise shows how to create Samba users and set up access credentials for
107107
```bash
108108
id sambarockstar
109109
```
110-
3. Add the new sambarockstar system user to the Samba user database and simultanously
111-
set a password for the Samba user:
110+
3. Add the new sambarockstar system user to the Samba user database and simultaneously set a password for the Samba user:
112111
113112
```bash
114113
sudo smbpasswd -a sambarockstar
@@ -124,7 +123,7 @@ This exercise shows how to create Samba users and set up access credentials for
124123
125124
### Accessing Samba Share (Local test)
126125
127-
In this exercise, we'll try accessing the new Samba share from the same system. This means that we'll be using the same host as both a server and client.
126+
In this exercise, we'll try accessing the new Samba share from the same system. This means that we'll be using the same host as both a server and a client.
128127
129128
#### To install Samba client tools
130129
@@ -148,7 +147,7 @@ In this exercise, we'll try accessing the new Samba share from the same system.
148147
sudo mount -t cifs //localhost/Shared ~/samba-client -o user=sambarockstar
149148
```
150149
151-
2. Use the `mount` command to list all mounted CIFS type file systems. Type:
150+
2. Use the `mount` command to list all mounted CIFS-type file systems. Type:
152151
```bash
153152
mount -t cifs
154153
```
@@ -158,7 +157,7 @@ In this exercise, we'll try accessing the new Samba share from the same system.
158157
...<SNIP>...
159158
```
160159
161-
3. Similarly use the `df` command to verify that the mounted share is available. Type:
160+
3. Similarly, use the `df` command to verify that the mounted share is available. Type:
162161
163162
```bash
164163
df -t cifs
@@ -170,7 +169,7 @@ In this exercise, we'll try accessing the new Samba share from the same system.
170169
//localhost/Shared 73364480 17524224 55840256 24% ~/samba-client
171170
```
172171
173-
4. Next list the contents of the mounted share. Type:
172+
4. Next, list the contents of the mounted share. Type:
174173
175174
```bash
176175
ls ~/samba-client
@@ -210,11 +209,11 @@ In this exercise, we'll try accessing the new Samba share from the same system.
210209

211210
### Using Samba for specific user groups
212211

213-
This exercise will walk through how to restrict access to Samba shares via a user's local group membership. This provides a convenient mechanism for making shared resources accessible only to specific user groups.
212+
This exercise will walk through restricting access to Samba shares via a user's local group membership. This provides a convenient mechanism for making shared resources accessible only to specific user groups.
214213
215214
#### To create a new group for Samba user
216215
217-
1. Use the groupadd utility to create a new system group named rockstars. This is the group that we'll use in our example for housing system users that can access a given resource. Type:
216+
1. Use the groupadd utility to create a new system group named rockstars. We'll use this group in our example for housing system users who can access a given resource. Type:
218217
```bash
219218
sudo groupadd rockstars
220219
```
@@ -224,8 +223,7 @@ This exercise will walk through how to restrict access to Samba shares via a use
224223
```
225224
#### To configure valid users in Samba configuration
226225

227-
1. Use the sed utility to add a new valid users paranter to the share definition in the
228-
Samba config file. Type:
226+
1. Use the sed utility to add new valid user parameters to the share definition in the Samba config file. Type:
229227
```bash
230228
sudo sed -i '/\[Shared\]/a valid users = @sambagroup' /etc/samba/smb.conf
231229
```
@@ -238,18 +236,18 @@ This exercise will walk through how to restrict access to Samba shares via a use
238236

239237
## Exercise 6
240238

241-
This exercise simulates a real-world scenario where you'll act in the role of an Administrator of a client system, and then test accessing the Samba service on remote system (serverHQ) on which you do not have any Administrative access or privileges. client as a student, will set up a Samba client on your machine (serverXY) to access a Samba service hosted on a different machine (serverHQ). This reflects common workplace setups.
239+
This exercise simulates a real-world scenario in which you'll act as an administrator of a client system and then test accessing the Samba service on the remote system (server HQ), to which you do not have any administrative access or privileges. As a student, you will set up a Samba client on your machine (serverXY) to access a Samba service hosted on a different machine (serverHQ). This reflects standard workplace setups.
242240
243241
Assumptions:
244242
245-
- You do not have root access on serverHQ.
243+
- You do not have root access to serverHQ.
246244
- The Samba share on serverHQ is already set up and accessible.
247245
248246
#### To set up Samba client on serverXY
249247
250248
Configure your machine (serverXY) as a Samba client to access a shared directory on a separate host (serverHQ).
251249
252-
1. Ensure that the necessary samba client utilities are installed on your local system.
250+
1. Ensure the necessary Samba client utilities are installed on your local system.
253251
Install them if necessary by running:
254252
255253
```bash
@@ -292,4 +290,4 @@ You will need the IP address or hostname of serverHQ, the share name, and your S
292290
293291
```bash
294292
sudo umount ~/serverHQ-share
295-
```
293+
```

0 commit comments

Comments
 (0)