Lab 10.4.6: Creating a Samba Server Estimated Time: 25 minutes Objective Configure a Linux server as a Samba file server to provide access to Windows clients.. These Windows clients n
Trang 11 - 2 IT Essentials II v2.0 - Lab 10.4.6 Copyright 2002, Cisco Systems, Inc
Lab 10.4.6: Creating a Samba Server
Estimated Time: 25 minutes
Objective
Configure a Linux server as a Samba file server to provide access to Windows clients
Equipment
• A computer with Linux Red Hat 7.X installed
• A computer on the same network as the Linux computer with Windows 2000 installed
Scenario
The system administrator of a large company has a large number of Windows
workstations that employees use These Windows clients need access to the Linux file servers to backup their data and access shared files on the network
Procedures
Step 1: Adding a Samba User
Note: Log in as the root user prior to starting this lab
Adding a Samba user account is similar to adding a regular user account:
1 Add the user account for the user that needs access to the Linux file server To
do this, enter useradd –m johnd at the shell prompt
2 Assign a password for the new user account Enter passwd johnd at the shell prompt After this command is entered, the operating system will return a message stating that it is changing the password for the johnd user account It will ask for the new password once and then again for verification To add additional Samba user accounts , repeat steps 1 and 2
3 Create the Samba password file Enter the following command at the command prompt:
cat /etc/passwd | /usr/bin/mksmbpasswd.sh > /etc/samba/passwd
4 Add an SMB password for users that have Samba accounts Enter smbpasswd
johnd at the shell prompt After this command has been entered, the operating
Trang 22 - 2 IT Essentials II v2.0 - Lab 10.4.6 Copyright 2002, Cisco Systems, Inc
system will return a message stating that it is changing the SMB password for the johnd user account It will ask for the new password once and then again for verification
Step 2: Starting the Samba Service
To start the Samba Service use the following steps:
1 To start the SMB daemon, enter /etc/init.d/smb/ start at the shell prompt This command will run the Samba service during the current session but once the system is rebooted, the Samba service will be turned off
2 To start the Samba service automatically every time, reboot the system and enter
/sbin/chkconfig smb on at the shell prompt. This command will force the Samba service to start automatically in run levels 3, 4, and 5
At this point the user can go to any Windows system and map a network drive to the home directory for the newly created user account To map a network drive, use the following syntax from a Windows system
//Linux servername/username
Reflection
What are some of the advantages of creating a share like this for Windows systems? Are there any security concerns that need to be addressed?