participate


Sys Admin Best Practices - Samba on Solaris 10
<<   Back to Forum  |   Give us Feedback
This topic has 20 replies on 2 pages.    1 | 2 | Next »
HarrySukumar
Posts:7
Registered: 9/7/06
Samba on Solaris 10   
Sep 7, 2006 7:32 PM

 
I am a newb

Can some please tell me how i can configure samba on Solaris 10 ? Is samba already installed on Solaris 10?

Here is the result of what i found on the system

bash-3.00# svcs -a | grep samba
legacy_run Sep_06 lrc:/etc/rc3_d/S90samba
bash-3.00#

Your help is greatly appreciated

Thanks

Harry
 
darma
Posts:4
Registered: 9/12/06
Re: Samba on Solaris 10   
Sep 12, 2006 10:26 AM (reply 1 of 20)  (In reply to original post )

 
Hi harry:

You can use swat for configure the smb.conf file, the shared resources and the services, you should add the swat in the port 901 in /etc/services and then you can access with http:\\yoourserver:901 in your browser.
I recommend you only use swat for the first configuration.

Regards.

Emilio
 
darma
Posts:4
Registered: 9/12/06
Re: Samba on Solaris 10   
Sep 12, 2006 10:28 AM (reply 2 of 20)  (In reply to original post )

 
Hi harry:

You can use swat for configure the smb.conf file, the shared resources and the services, you should add the swat in the port 901 in /etc/services and then you can access with http:\\yoourserver:901 in your browser.
I recommend you only use swat for the first configuration.

Regards.

Emilio
 
HarrySukumar
Posts:7
Registered: 9/7/06
Re: Samba on Solaris 10   
Sep 17, 2006 11:51 PM (reply 3 of 20)  (In reply to #2 )

 
Hi Darma,

Thanks for the reply can you please explain me how exactly i am suppose to be doing this as when i tried to edit /ete/service file it come up with a message saying it is a read only file and felt that it is not the right way to go about..

Darma if you happen to find some time can you explain me how to setup samba on solaris 10

Thanking you in Advance

Message was edited by:
HarrySukumar
 
Fritz
Posts:137
Registered: 8/7/06
Re: Samba on Solaris 10   
Sep 18, 2006 11:23 PM (reply 4 of 20)  (In reply to #3 )

 
Hi, here is a detailed description on how i have setup Samba, as as SMF service, it covers the SMF setup and the Swat configuration. I converted it from a word document, so the formatting is not verry nice, sorry.

Samba
We use the samba from sun (SFW) its configuration files are in /etc/sfw

Samba Setup
First we remove the old startup scripts:
# ls -l /etc/rc?.d/???samba
-rwxr--r--   6 root     sys          324 Jan 14  2006 /etc/rc0.d/K03samba
-rwxr--r--   6 root     sys          324 Jan 14  2006 /etc/rc1.d/K03samba
-rwxr--r--   6 root     sys          324 Jan 14  2006 /etc/rc2.d/K03samba
-rwxr--r--   6 root     sys          324 Jan 14  2006 /etc/rc3.d/S90samba
-rwxr--r--   6 root     sys          324 Jan 14  2006 /etc/rcS.d/K03samba
# rm /etc/rc?.d/???samba
# mv /etc/init.d/samba /etc/init.d/nonsmf_samba
 


Then we need a configuration:
# cd /etc/sfw
# cp swamba.conf-exampel samba.conf
 

Create a control script /opt/local/lib/svc/method/samba which contains
#!/sbin/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
 


The manifest in /root/samba/samba.xml should contain
<?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='/opt/local/lib/svc/method/samba start' timeout_seconds='60'>
      <method_context/>
    </exec_method>
    <exec_method name='stop' type='method' exec='/opt/local/lib/svc/method/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>
 


Import the manifes
# svccfg import /root/samba/samba.xml
 


Start Samba
# svcadm enable samba

SWAT Setup
First, add an entry in /etc/services for swat:-
swat            901/tcp                      # Samba Web Administration Tool
 

now, create a file containing a valid inted.conf-style entry for swat, for example /inet.swat:
# echo swat   stream   tcp   nowait   root   /usr/sfw/sbin/swat   swat>>inet-swat
 


Now run inetconv as follows:-
# inetconv  -i  inet-swat 
swat -> /var/svc/manifest/network/swat-tcp.xml
Importing swat-tcp.xml ...Done
 

Now swat can be enabled (Note the service name):-
#  inetadm -e svc:/network/swat/tcp:default
 

List the service as follows:-
# inetadm   -l   svc:/network/swat/tcp:default
SCOPE    NAME=VALUE
         name="swat"
         endpoint_type="stream"
         proto="tcp"
         isrpc=FALSE
         wait=FALSE
         exec="/usr/sfw/sbin/swat"
         user="root"
default  bind_addr=""
default  bind_fail_max=-1
default  bind_fail_interval=-1
default  max_con_rate=-1
default  max_copies=-1
default  con_rate_offline=-1
default  failrate_cnt=40
default  failrate_interval=60
default  inherit_env=TRUE
default  tcp_trace=FALSE
default  tcp_wrappers=FALSE
 

Now we can connect to SWAT with the url:
http://<hostname>:901/


Message was edited by:
Tom_Tiger
 
HarrySukumar
Posts:7
Registered: 9/7/06
Re: Samba on Solaris 10   
Sep 20, 2006 3:35 AM (reply 5 of 20)  (In reply to #4 )

 
Hi Tom,

Thanks you very very very much. You have helped me heaps,

Bless you and live long and happy life. Tom I have been working on samba from past few days and could not find enough help on the web and my supervisor was repeatedly asking me about this, I was in a sort of pressure

Tom in case if I am stuck some where do you mind if I ask you a question. Please feel free to say no. as such your post has help me plenty

I have just started to work as Systems Administrator and I have to work all by my self.

It is sort of a learning curve for me.

Once again thanks very much for your reply
 
HarrySukumar
Posts:7
Registered: 9/7/06
Re: Samba on Solaris 10   
Sep 20, 2006 3:38 AM (reply 6 of 20)  (In reply to #4 )

 
Hi Tom,

Thanks you very very very much. You have helped me heaps,

Bless you and live long and happy life. Tom I have been working on samba from past few days and could not find enough help on the web and my supervisor was repeatedly asking me about this, I was in a sort of pressure

Tom in case if I am stuck some where do you mind if I ask you a question. Please feel free to say no. as such your post has help me plenty

I have just started to work as Systems Administrator and I have to work all by my self.

It is sort of a learning curve for me.

Once again thanks very much for your reply
 
Fritz
Posts:137
Registered: 8/7/06
Re: Samba on Solaris 10   
Sep 21, 2006 1:58 PM (reply 7 of 20)  (In reply to #6 )

 
No problem, feel free to ask, but I am on vacation till 1. Oct, so please be patient.

Fritz
 
HarrySukumar
Posts:7
Registered: 9/7/06
Re: Samba on Solaris 10   
Sep 27, 2006 6:55 PM (reply 8 of 20)  (In reply to #7 )

 
I have successfully configured samba and swat on my Solaris 10 box. Currently I am trying to add my Solaris 10 server to Windows Domain so called the uninet.

Your help is greatly appreciated.

Thanks
 
Fritz
Posts:137
Registered: 8/7/06
Re: Samba on Solaris 10   
Oct 1, 2006 1:23 PM (reply 9 of 20)  (In reply to #8 )

 
Here are the settings you need in your smb.conf, you can add it over swat:
You need
Workgroup=xxxx
Security=SERVER
Password Server=yyyyy

Should look like:

<code>
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
workgroup = uninet

# server string is the equivalent of the NT Description field
server string = <Your Sabmba Server Description>

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the Samba-HOWTO-Collection for details.
security = SERVER

netbios name = <your Samba Server Hostname>
encrypt passwords = Yes
password server = <Fully Quilified Name of the Active Directory Server of uninet>
log level = 1
wins server = <IP of your wins server>
</code>

Message was edited by:
Tom_Tiger
 
Salmon1231
Posts:1
Registered: 11/29/06
Re: Samba on Solaris 10   
Nov 29, 2006 9:27 AM (reply 10 of 20)  (In reply to #4 )

 
Tom_Tiger, thanks for this information!

I'd just like to clarify one point. The control script we create at /opt/local/lib/svc/method/samba needs to be executable. I propose the following addition after the script file contents.

# chmod +x /opt/local/lib/svc/method/samba
 
TomZurita
Posts:3
Registered: 6/8/06
Re: Samba on Solaris 10   
Mar 7, 2007 10:52 AM (reply 11 of 20)  (In reply to #9 )

 
Have a customer that has an x4500 and they would like to configure SAMBA to work with their Windows boxes. They do not know Solaris or SAMBA. I planned on letting them use SWAT and then also letting them do user authentication on their AD boxes. How can this be done with Solaris 10, with SAMBA not being compiled w/o AD support.

Would this work:

Workgroup=xxxx
Security=SERVER
Password Server=yyyyy

So that they only have to worry about adding users to Windows?
 
cbecker001
Posts:6
Registered: 6/30/06
Re: Samba on Solaris 10   
Nov 8, 2007 11:11 AM (reply 12 of 20)  (In reply to #4 )

 
I am replying in November of 2007 and this is still the best post I have found for setting up Samba on Solaris 10. Thanks a lot!
 
crobook
Posts:3
Registered: 9/26/07
Re: Samba on Solaris 10   
Jan 22, 2008 11:47 AM (reply 13 of 20)  (In reply to #4 )

 
On Solaris 10 (08/07):

1. There is no /opt/local/lib/svc/method. Run control scripts go in /etc/init.d.

2. There is no /root like there is on Linux. The manifest is located at:
/var/svc/manifest/network/samba.xml

What operating system did you do this on?

Anyway, I was able to get this to work. Thanks for your help.

Edited by: crobook on Jan 22, 2008 11:43 AM
 
microtrip
Posts:1
Registered: 1/25/08
Re: Samba on Solaris 10   
Jan 25, 2008 9:01 AM (reply 14 of 20)  (In reply to #13 )

 
I just thought it proper to give thanks where it is due. I followed your instructions and everything worked perfect. The thing is I have configured samba plenty of times on linux but Solaris is a lot different and your posts made all the difference. I did get get stuck on one part when I created the inet file " this is funny" it wouldnt import i kept getting errors anout wait state. I was like what the hell is going on. I took a step back and realized that it was for swat not echo. I then slapped myself and kept going. Just funny how when your following directions you can be to precise.

Thanks Tom
 
This topic has 20 replies on 2 pages.    1 | 2 | Next »
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 28
  • Guests : 133

About Sun forums
  • Oracle Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Oracle Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums