Catatan kerja

Database beberapa permasalahan yang terjadi di tempat kerja

Configuring samba on Solaris 9 October 29, 2008

Filed under: Unix — aderahman @ 6:31 am

I learn how to configure samba using SWAT . It’s quite simple anf easier.

first of all , you need to download samba package from samba.org or sunfreeware.com

Then install the samba on the Solaris:

pkgadd -d /gdm002/ade/samba_3.0_25.ab.spacr9.pkg

If you want to remove the samba from the solaris,

pkgrm SMCsamba

If you want to know what package installed related with samba :

pkginfo -a | grep samba

How to check what version of samba is using :

root# /usr/sfw/sbin/smbd -V
Version 3.0.21b

Configuring Samba server and how to connect via SWAT and Netbios

Edit /etc/services and make the following changes.

Immediately after the line which reads:

	sunrpc		111/tcp		rpcbind

insert the two lines:

	netbios-ns      137/udp		# Samba nmbd
	netbios-ssn     139/tcp		# Samba smbd

and, after the line which reads:

	ldaps		636/udp		# LDAP protocol over TLS/SSL (was sldap)

insert the line:

	swat 		901/tcp		# Samba swat

Now edit /etc/inetd.conf and add the following three lines to the end of the file:

	netbios-ssn	stream	tcp	nowait	root	/usr/local/samba/bin/smbd smbd
	netbios-ns	dgram	udp	wait	root	/usr/local/samba/bin/nmbd nmbd
	swat		stream	tcp	nowait.400	root	/usr/local/samba/bin/swat swat

If you have TCP wrappers installed , the three lines to be added should read:

	netbios-ssn	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/local/samba/bin/smbd smbd
	netbios-ns	dgram	udp	wait	root	/usr/sbin/tcpd /usr/local/samba/bin/nmbd nmbd
	swat		stream	tcp	nowait.400	root	/usr/sbin/tcpd /usr/local/samba/bin/swat swat

Tell the inetd daemon to re-read its configuration file:

	# pkill -HUP inetd

and Samba is installed and working.

Using SWAT to configure Samba on Solaris 9 :

testing : open browser then open http://localhost:901 or you can connect remotly by using hostname or IP address , for example :

http://163.184.169.159:901

Configure Samba :

Find the smb.conf , it is placed under directory /usr/local/samba/lib/smb.conf or /etc/samba/lib/smb.conf or /etc/sfw/lib/smb.conf

Create a basic configuration file containing the following lines:

	# Global parameters
		workgroup = HOME
		security = Share
		hosts allow = localhost, local-machine-name, 192.168.1.
		hosts deny = All
	[root]
		path = /
		comment = Solaris root
		guest ok = Yes
		read only = Yes
	[share]
		path = /share
		comment = Solaris share
		guest ok = Yes
		read only = No

Note that “# Global parameters”, “[root]” and “[share]” should be positioned at the start of their lines and all other lines should be prefixed with a tab character.

In this file, replace HOME with the name of your Windows workgroup or domain. On a Windows 95 or 98 system, this is the “Workgroup” name set on the Identification tab in Start -> Settings -> Control Panel -> Network. On NT 4, this name is found in the same place but is called the “Domain”.

Also, replace local-machine-name with the name of your Solaris system so that it can connect to the swat Web server described later, and replace 192.168.1 with the first three components of the IP addresses used on your local network. The range 192.168.1.1 to 192.168.1.254 is reserved for private use and is a good choice to use for a local network. Note the presence of a dot after the partial IP address in the configuration file.

The effect of this basic configuration file is to allow access to your Solaris system from Windows machines on the local network only (those with IP addresses starting 192.168.1) and a password is not required to browse the Solaris system. The root file system is shared but is read-only and the /share directory is shared with both read and write access. Incoming connections to the Solaris system have a User and Group identity (uid and gid) of the “nobody” user by default

For more detail, you can see on this page http://www.oregontechsupport.com/samba/

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s