Enabling and configuring SAMBA as shipped with Solaris 10

bash-3.2# smbd restart
bash-3.2#
bash-3.2#
bash-3.2# whereis
whereis [ -sbmu ] [ -SBM dir ... -f ] name...
bash-3.2# whereis smbd
smbd: /usr/sbin/smbd /usr/man/man8/smbd.8






Sun ships SAMBA with Solaris 9 & Solaris 10 and it is supported as part of the Operating System. I recently completed a project withSymantec Enterprise Vault andSun StorageTek Storage Archive Manager (aka SAM-FS) which required me to do some work with SAMBA for the first time.

My requirement was to use SAMBA to give a server running Microsoft Windows Server 2003 and Symantec Enterprise Vault access to a SAM-FS file system on a Sun server running Solaris 10. The good news is that it does all work correctly and that it performed well. As a result, this configuration is now supported by Symantec.

Initially I struggled with SAMBA and looked at many web sites and docs before I worked out how to set it up. In the end it was simple and the object of this blog entry is to explain how to set up a basic SAMBA server installation on Solaris.

The below is correct for Solaris 9 and Solaris 10 up to Solaris 10 Update 3 (11/06). If you are running Solaris 10 Update 4 (8/07) then the version of SAMBA is 3.0.25a, the patches are not applicable and the way that you stop and start SAMBA has changed:look at this blog entry for notes on that.

  1. Make sure that /usr/sfw/bin and /usr/sfw/sbin are on the root user's path.

  2. Check you have the latest version of SAMBA installed:

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

    This is the most recent version supported by Sun at this time. If you find you have an older version than the above then you should patch the system. The latest patch for SAMBA on Solaris 10 SPARC is 119757-04 and Solaris 10 x86 is 119758-04. If you have access to Sunsolve then Sun InfoDoc 80581 talks about this some more.

  3. By default, all files create by the windows server in the Solaris directories shared by SAMBA will be owned by usernobody. If you want to change this then you can force the ownership to another user. I created a userevault in group other for this purpose. Make sure that the user you choose has permission to write to the directories in the file systems that you are sharing with SAMBA. You can use the userroot if you wish.

  4. Create an entry in the SAMBA user database for the user with the below command:

    root# smbpasswd -a evault

  5. Create the file /etc/sfw/smb.conf. Below is the /etc/sfw/smb.conf that I used. The SAM-FS file system was mounted as/ev_test and vaultstores was the subdirectory I wanted to share.

    [global]
    • workgroup = EV-SAMFS
      server string = Samba Server
      log file = /var/adm/samba_log.%m
      security = SHARE
    [vaultstores]
    • comment = vaultstores
      path = /ev_test/vaultstores
      force user = evault
      force group = other
      read only = No
      guest ok = Yes

    It is not obvious, but the share is defined in the square brackets and is "vaultstores" in this case.

    Note that once the file /etc/sfw/smb.conf exists SAMBA will start automatically when the system boots.

  6. You should check the syntax of /etc/sfw/smb.conf using the command testparm. Assuming that all is well you can start SAMBA.

    root# /etc/init.d/samba start

    This returns silently. If you are paranoid, like me, check to see that smbd is running. If you are running Solaris 10 Update 4 (8/07) or later this step has changed:look at this blog entry for notes on that.

From the server running Microsoft Windows I was then able to map the share \\\\servername\\vaultstores to a drive and create and delete files and directories. I then looked on the SAMBA server and confirmed that the file were created with the correct ownership, which they were.

So far as SAMBA performance tuning goes, I tried various configuration options, but in the end I used the default socket option settings, hence no custom settings for this in mysmb.conf file. I found that these gave the best performance. I was fortunate in being able to get advice on this topic fromJeremy Allison who has been involved with SAMBA for years.

Note that the version of SAMBA that Sun provides at the time of writing this does not support Active Directory Services (ADS), a frequently asked for feature. Sun will ship a later version of SAMBA with support for ADS as part of a future release of Solaris 10. In the meantime, you can build your own version of SAMBA with this feature using the packages and sources atSunfreeware.com but unfortunately the custom SAMBA build would not be supported by Sun.




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值