Go to Home Page GuidesHow to ArticlesReviewsForumsFrequently Asked QuestionsNewsLinksPotpourri

Site Search

 

Red Hat Linux Clean Install - The Whole Enchilada

Samba (Windows Networking)

(More details with screen shots are presented in How to Network Red Hat Linux and Microsoft Windows at http://duxcw.com/digest/Howto/network/linux/samba/1.htm.)

Made a Samba password file... Click the Terminal icon on the taskbar at the bottom of the gnome screen to get at the Linux command prompt... Enter

cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

(The easy way to do this is highlight the above line in Mozilla, Ctrl C to copy it, go to the Linux prompt, Edit, Paste.)

Entered the password for each existing user account (the above command just creates the users); e.g.,

smbpasswd lbyard

Changed permissions on the Samba password file with:

chmod 600 /etc/samba/smbpasswd

Verified the samba password file with...

cat /etc/samba/smbpasswd

(In the future use...

smbpasswd -a <username>

...to add any new users to the file. This may produce an error, but it works anyway. Just ignore it.)

Backuped the Samba configuration file... Nautilus, browse to /ect/samba, right-click smb.conf, Copy file, right-click over an empty area, Paste Files. That will create smb (copy).conf.

Edited the smb.conf file... In Mozilla highlight the text below starting with [global] and ending with bad user, right-click, copy.

[global]
workgroup = WORKGROUP
server string = Samba Server
hosts allow = 192.168.123. 127.
guest account = pcguest
security = share
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[shared]
comment = Shared read/write directory for all LAN users and guests
path = /home/shared
public = yes
only guest = yes
writable = yes
printable = no
[homes]
comment = Home directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
map to guest = bad user

Make a shared folder for the local LAN users...

In Nautilus, browse to /home (you should see a home directory/folder for each user), File, New Folder, right-click it, Show Properties...
Basic, Name = shared
Permissions, File Owner = pcguest, File Group = pcguest, Check all boxes for a chmod number view of 777.
Close

Start Samba...

Start, Programs, System, Service Configuration, scroll down to smb, check the check box, File, Save Changes (so Samba will start automatically on booting), Start, wait for the acknowledgement that is has started, OK.

Test Samba.

In Nautilus, type smb: in the Address box.
(You should see WORKGROUP)

Double-click WORKGROUP to see the PCs on the LAN that are on.

Double-click a PC to see its shares.

Right-click a text file on one of the disc shares, Copy File, pick a blank spot on the gnome desktop, right-click, Paste Files, and you should see its icon on the gnome desktop.

Went to Windows Me computer, restarted Windows, opened the Network Neighborhood/My Network Places with the Windows Explorer... From Windows Me, the process is... Restart, Windows Explorer, My Network Places, Entire Network, Workgroup, and you should see linux. The Windows 2000 computer did not require restarting. If this is the first login you will be prompted for your Samba Account/Password. You should not have login in again after that.

Samba is up and the Linux host computer is networked with the other computers on the LAN.

SWAT (Samba Web Administration Tool)

Used Nautilus to make backup copy of /etc/xident.d/swat (if the file isn't there, make one with qedit)

Copied and pasted the following to replace the swat configuration file:

# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
disable = no
port = 901
socket_type = stream
wait = no
# only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
}

This configuration makes SWAT accessible with a web browser from Linux and from any PC on the LAN. To restrict use to LINUX uncomment (remove the # ) the only_from line. The original SWAT file had only_from = localhost. SWAT won't work that way because of bug in xinetd.

Service Configuration, check SWAT, File, Save Changes, Restart xinet.d (you will not beable to the same with SWAT--don't worry about; xinetd does that.)

Tested SWAT from Linux
Enter localhost:901 in the Mozilla address Window and login as any user.
Swat is up.

Test it from the Windows Me computer.
Enter http://192.168.123.1:901 in a browser Address Window.
Login as any user.
SWAT is up on the LAN.

(http://linux:901 will also work. So will http://192.168.123.2:901/)

< Previous Page | Next Page >

Copyright, Disclaimer, and Trademark Information Copyright © 1996-2006 Larry F. Byard.  All rights reserved. This material or parts thereof may not be copied, published, put on the Internet, rewritten, or redistributed without explicit, written permission from the author.