Dear managers, thanks to "Martin Marshall" <martinm@allwest.net> renny.koshy@rubixinfotech.com francisco roque <frisco@blackant.net> <Gerhard.Weick@hzd.hessen.de> Matthew Taylor <matthew.taylor@montgomerycollege.edu> "Monappallil, George" <george.monappallil@rpfl.com> sunmanagers@danielfrank.net vogelke+sunlist@pobox.com (Karl Vogel) for their kind responses. It's working for me now. Please find attached my notes. Regards, Andreas Samba Samba is already preinstalled on Solaris 10. pkginfo -l | grep samba NAME: samba - A Windows SMB/CIFS fileserver for UNIX (client) DESC: samba - A Windows SMB/CIFS fileserver for UNIX (client) 3.0.21b NAME: samba - A Windows SMB/CIFS fileserver for UNIX (Root) DESC: samba - A Windows SMB/CIFS fileserver for UNIX (Root) 3.0.21b NAME: samba - A Windows SMB/CIFS fileserver for UNIX (Usr) DESC: samba - A Windows SMB/CIFS fileserver for UNIX (Usr) 3.0.21b We save the old rc* scripts as follows. Who knows may be we need them later. ls -l /etc/rc?.d/???samba -rwxr--r-- 6 root sys 324 Jul 3 2006 /etc/rc0.d/K03samba -rwxr--r-- 6 root sys 324 Jul 3 2006 /etc/rc1.d/K03samba -rwxr--r-- 6 root sys 324 Jul 3 2006 /etc/rc2.d/K03samba -rwxr--r-- 6 root sys 324 Jul 3 2006 /etc/rc3.d/S90samba -rwxr--r-- 6 root sys 324 Jul 3 2006 /etc/rcS.d/K03samba tar cvpf - /etc/rc?.d/???samba | gzip -c > /var/tmp/etc-rc-samba.tar.gz This archive can be extracted again as follows if we need these files later. gunzip < /var/tmp/etc-rc-samba.tar.gz | tar -tvpf - We can delete the scripts now but let's wait with that until the services are up and running. rm /etc/rc?.d/???samba We create the sbm.conf file and make sure it looks as indicated below: cd /etc/sfw mv smb.conf smb.conf.orig cp smb.conf-example smb.conf pico /etc/sfw/smb.conf [global] server string = Samba Server interfaces = 10.0.0.202 bind interfaces only = Yes log level = 1 syslog = 0 log file = /var/log/samba/%m.log max log size = 50 [homes] path = /home/%u [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No We create /var/log/samba before starting smb. mkdir /var/log/samba tail -f /var/log/samba/smbd.log We used the start script supplied by Sun. pico /etc/init.d/samba #!/bin/sh # case "$1" in start) /usr/sfw/sbin/smbd -D /usr/sfw/sbin/nmbd -D ;; stop) pkill smbd pkill nmbd ;; *) echo "Usage: $0 { start | stop }" exit 1 ;; esac exit 0 chmod a+x /etc/init.d/samba We create a manifest file for setting up the service: pico /var/svc/manifest/network/samba.xml <?xml version='1.0'?> <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> <service_bundle type='manifest' name='WISWsamba:samba'> <service name='site/samba' type='service' version='0'> <create_default_instance enabled="false"/> <single_instance/> <!-- First of all, if the config file is not present, then we needn't bother with anything else. --> <dependency name="config-file" grouping="require_all" restart_on="none" type="path"> <service_fmri value="file:///etc/sfw/smb.conf"/> </dependency> <!-- If there's no network, then there's no point in running --> <dependency name='loopback' grouping='require_all' restart_on='error' type='service'> <service_fmri value='svc:/network/loopback:default'/> </dependency> <dependency name='physical' grouping='optional_all' restart_on='error' type='service'> <service_fmri value='svc:/network/physical:default'/> </dependency> <!-- Since Samba may be providing a home directory service, it is as well that we ensure that the file-systems are all mounted before it is started. This is not essential but in general it is a good thing and doesn't really hurt. --> <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/system/filesystem/local'/> </dependency> <!-- now we have the start stop and refresh methods --> <exec_method name='start' type='method' exec='/etc/init.d/samba start' timeout_seconds='60'> <method_context/> </exec_method> <exec_method name='stop' type='method' exec='/etc/init.d/samba stop' timeout_seconds='60'> <method_context/> </exec_method> <property_group name='samba' type='application'> <stability value='Evolving'/> </property_group> <property_group name='startd' type='framework'> <propval name='ignore_error' type='astring' value='core,signal'/> </property_group> <stability value='Evolving'/> <!-- A description of the Service --> <template> <common_name> <loctext xml:lang='C'>Samba Server</loctext> </common_name> <documentation> <manpage title='samba' section='1M'/> <doc_link name='samba.org' uri='http://httpd.samba.org'/> </documentation> </template> </service> </service_bundle> We doublecheck the manifest for errors and then start the service. svccfg validate /var/svc/manifest/network/samba.xml svcadm -v disable samba svccfg delete samba svccfg import /var/svc/manifest/network/samba.xml svcadm -v enable samba svcs -a | grep samba svcs -vx svc:/site/samba:default svcs -l svc:/site/samba:default svcadm restart svc:/system/svc/restarter:default ps -Af | grep smbd ps -Af | grep nmbd We also add a service for the swat administration tool. pico /etc/services swat 901/tcp # Samba Web Administration Tool pico /etc/inetd.conf We add the following to /etc/inetd.conf swat stream tcp nowait root /usr/sfw/sbin/swat swat>>inet-swat and run inetconv -f -o /var/tmp This gives us swat -> /var/tmp/swat-tcp.xml Importing swat-tcp.xml ...Done inetadm -e svc:/network/swat/tcp:default svcs -a | grep swat svcs -l svc:/network/swat/tcp:default inetadm -l svc:/network/swat/tcp:default We can now access the samba administration page via the following URL: http://merkur:901 On the Solaris machine we create the samba user accounts we would like to grant access to samba resources to. smbpasswd -a ahoesch ... These accounts should already exist on the Windows Server and in /etc/passwd on the Solaris machine. On the Solaris machine we can do /usr/sfw/bin/smbclient -L SF490 to see which recources we have access to. It asks for a password of the current user which must be an existing samba user (smbpasswd -a ...), so if we run this command as root we should have done "smbpasswd -a root" before. We can now log into the windows machine, e.g. using the Sun Ray windows connector /opt/SUNWutssc/bin/utssc -l de-DE -g 1024x768 <ipaddress of windows machine> and then click on Start - Arbeitsplatz - Netzwerkumgebung - Arbeitsgruppencomputer anzeigen - Microsoft Windows Netwerk - Workgroup - Sambe Server (SF490) - homes On any unix client with samba installed we could use smbclient //SF490/ahoesch to access resources. Troubleshooting In case of problems check tail -f /var/log/samba/smbd.log or try to start smbd manually with /usr/sfw/sbin/smbd -i The following settings solved a "bind failed on port 139 socket_addr = 0.0.0.0. Error = Address already in use" problem for me. [global] interfaces = 10.0.0.202 bind interfaces only = Yes _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Wed Feb 27 18:14:14 2008
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:10 EST