SAMBA Setup on Redhat 8
Set up SAMBA service allows a window host to access
the Linux file system. Make it easier for copying file over. It also
allow Linux user to access windows drive and printer.
Here are the steps:
- Create /etc/smb.conf file similar to the one below
; /etc/smb.conf
;
; Make sure and restart the server after making changes to this file, ex:
; /etc/rc.d/init.d/smb stop
; /etc/rc.d/init.d/smb start
[global]
; Uncomment this if you want a guest account
; guest account = nobody
log file = /var/log/samba-log.%m
lock directory = /var/lock/samba
share modes = yes
workgroup = UCCS
[homes]
comment = Home Directories
browseable = no
read only = no
create mode = 0750
- Change firewall setting to allow the following
ports or network services
netbios-ns 137/tcp
# NETBIOS Name Service
netbios-ns 137/udp
netbios-dgm 138/tcp
# NETBIOS Datagram Service
netbios-dgm 138/udp
netbios-ssn 139/tcp
# NETBIOS session service
netbios-ssn 139/udp
Select redhat | system settings | security level
You can also use the command "lokkit" to bring up a text-based interface
Select the predefined network services such as WWW, FTP, SSH, Telnet,
and
at Other ports: type in 137:tcp, 137:udp, 138:tcp, 138:udp, 139:tcp,
139:udp
The new GUI interface does not seem to provide text box for entering additional
ports!! You need to use text-based interface such as lokkit.
- Create SMB password, so that window client can access Linux using the same
password on Linux. Enter the same password you used on Linux.
[root@chow8 vmware-linux-tools]# smbpasswd -a chow
New SMB password:
Retype new SMB password:
unable to open passdb database.
Added user chow.
- Activate smb by selecting redhat | server settings | service to bring up
service configuration window, then select smb by click one the square symbol
to turn on the check mark. The service will be high lighted. You can then
click on start or restart to start the servcie.
You can also use "service smb start" command to start samba
Access Linux directory from a window host.
- The above will allow the window host to type \\<linuxhostname>\
in start | cmd window to open a folder for access the linux file system.
or use ip address here.
- You will ask to enter the login name and password.
Access the SMB share from Linux
- Use "mount -t smbfs -o username=chow,password=xxxx //jen/pub /jenpub"
to mount the pub share folder on machine jen to a directory /jenpub on the
linux machine.