RedHat 9 Virtual Machine to build a simple Samba Server
1. Required Software
Samba-2.2.7a-7.9.0.i386.rpm
Samba-client-2.2.7a-7.9.0.i386.rpm
Samba-common-2.2.7a-7.9.0.i386.rpm
2. Install samba
[Plain]
$ Rpm-ivh samba-common-2.2.7a-7.9.0.i386.rpm
$ Rpm-ivh samba-client-2.2.7a-7.9.0.i386.rpm
$ Rpm-ivh samba-2.2.7a-7.9.0.i386.rpm
Note: I = install, install, v = verbose, prompt; h = hash, display progress bar.
3. Create a new user (as a Samba user)
[Plain]
$ Useradd yoyo
$ Passwd yoyo
4. Create a password file for Samba users (set all users in passwd to samba Users)
[Plain]
$ Cat/etc/passwd | mksmbpasswd. sh>/etc/samba/smbpasswd
5. Set the samba password for samba users
[Plain]
$ Smbpasswd yoyo
6. Start the samba server
[Plain]
$ Service smb start
Note: restart the samba service, use the service smb restart command, stop the samba service, and use the service smb stop command.
7. Access samba server via Win7
(1) modify the Local Security Policy of Windows 7)
"Run secpol. msc> Local Policy> Security Options. Find Network Security: LAN Manager Authentication Level on the right ", change the security settings from "not defined" to "Send LM and NTLM-use NTLMv2 session security (&)" If negotiated (&)".
(2) view the IP address of the RedHat 9 Virtual Machine
[Plain]
[Root @ localhost root] # ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: 6B: 36: 69
Inet addr: 192.168.0.99 Bcast: 192.168.0.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 1285 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 250 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 100
RX bytes: 104615 (102.1 Kb) TX bytes: 25905 (25.2 Kb)
Interrupt: 5 Base address: 0x2024
Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Up loopback running mtu: 16436 Metric: 1
RX packets: 714 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 714 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 47974 (46.8 Kb) TX bytes: 47974 (46.8 Kb)
(3) temporarily disable the RedHat9 Firewall
"Setup"-> "firewallconfiguration", select "no firewall", and then "OK" to exit.
(4) Access samba server via Win7
"Run"-> "\ 192.168.0.99" (IP address of the RedHat 9 Virtual Machine). The login box will appear during the first access, and you will not need to log on again later.
Author: Xun Yunfeng