Saturday, July 11, 2009

Samba Notes

Integrates Unix-type systems with Windows
SMB(139)/CIFS(445) - 2 protocols used to communicate with Windows/Samba servers

Key Client Utilities:
1. smbtree - network neighborhood text utility
It enumerates workgroups, hosts & shares
smbtree -b - relies upon broadcasts for resolving workgroups/hosts
smbtree -D - echoes discovered workgroups using broadcasts/master browser

2. smbclient - provides an FTP-like interface to SMB/CIFS servers
smbclient service_name(//LINUXCBTWIN1/LinuxCBT)

Note: Most, if not all, Samba clients operate in case-insensitive mode
smbclient //linuxcbtwin1/linuxcbt
Note: when in smbclient interactive mode, prefix commands with '!' to execute locally on client, otherwise commands run on server

smbclient -L linuxcbtwin1 - enumerates the shares on the server\

smbclient -A ./.smbpaswd //linuxcbtwin1/solaris10

.smbpaswd
username=unixcbt
password=abc123


3. smbtar - facilitates backups of remote shares
smbtar -s linuxcbtwin1 -x solaris10 -t solaris10.tar - backup
smbtar -s linuxcbtwin1 -x solaris10 -r -t solaris10.tar - restore


###Remote Desktop Installation ###
Requirements - www.sunfreeware.com:
1. libiconv
2. libgcc 3.3.2 or higher
3. libopenssl 0.9.7
4. rdesktop-1.4.1

Features RDesktop support for Remote Desktop Protocol (RDP) versions 4 & 5
Connects to:
1. Windows XP - RDP-5
2. Windows 2000 - RDP-5
3. Windows 2003 - RDP-5
4. Windows NT Server 4 - Terminal Services Edition - RDP-4

###usage###

rdesktop -g 700x500 -a 16 server_name(192.168.1.102)



###Samba Server Configuration###
/etc/sfw/smb.conf-example - modify & save as /etc/sfw/smb.conf

smb.conf - is the main configuration file for Samba server & many of the Samba clients search for key directives from the file.

Features:
1. File & Print sharing
2. Implemented as 2 daemons (smbd & nmbd)
smbd - file & print sharing - connections based on SMB/CIFS protocols
SMB - TCP 139
CIFS - TCP 445
nmbd - handles NETBIOS names using primarily UDP connectivity
Browse list (master browser or derive current list from master browser)
Names of servers - derived using broadcast or WINS
UDP 137 & 138
3. Legacy service - does not currently benefit from SMF
4. Service is located in: /etc/init.d & referenced via run-levels
5. Configuration changes to /etc/sfw/smb.conf are read automatically

###Samba Security Modes###
Default = security = user - relies upon local Unix accounts database & Samba database to grant or deny access to shared resources
1. /etc/passwd
2. /etc/sfw/smbpasswd - handles translation of Windows auth to Unix auth
3. /etc/sfw/smbusers - provides translation between Unix & Windows users
i.e. translation of Windows' 'guest' user to Unix' 'nobody' user

###User Authentication Mode###
Note: NETBIOS names are restricted to 16 characters, however, 15 characters are configurable
linuxcbtsun1.linuxcbt.internal = FQDN
Note: smbpasswd -a unixcbt - create permitted samba users in /etc/sfw/private/smbpasswd file - otherwise, access will be denied

###Samba Web Administration Tool (SWAT)###
Steps to enable Swat:
1. create an /etc/services entry for SWAT - TCP:901
2. create an /etc/inetd.conf entry for SWAT
swat stream tcp nowait root /usr/sfw/sbin/swat swat
3. Convert the inetd entry for SWAT to SMF using 'inetconv'




Readers who read this page, also read:




Bookmark and Share My Zimbio http://www.wikio.com

0 comments: