Getting Started With the Solaris CIFS Service

本文介绍 Solaris 操作系统中 CIFS 服务的安装与配置流程,包括如何选择域模式或工作组模式、如何加入 Active Directory 域或工作组、创建 CIFS 共享等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Caution - This is a beta release of the Solaris[tm] Common Internet File System (CIFS) service for evaluation and OpenSolaris[tm] development. Do not use this service in a production environment where service availability and data reliability are required.

This document is intended to get you running the CIFS service on your Solaris system. You should already be familiar with these Solaris utilities. For more information, see the man pages for these utilities and files:

  • idmap(1M)
  • sharemgr(1M) and sharectl(1M)
  • svcs(1M) and svcadm(1M)
  • zpool(1M) and zfs(1M)
  • krb5.conf(4)
  • resolv.conf(4)

Solaris CIFS services can operate in two modes: domain and workgroup. These modes are mutually exclusive. Choose one or the other based on your environment and authentication needs.

  • If you have an Active Directory (AD) domain and want to give domain users access to the Solaris CIFS service, choose domain mode by joining that domain.

  • If you have no AD domains or have no need to support domain users, and you want to use local Solaris users to access the CIFS service, choose workgroup mode by joining the workgroup.

After you have successfully joined a workgroup or an AD domain, you can create and access CIFS shares.

For more information about configuring the identity mapping service and the Solaris CIFS service, see the following chapters of the Solaris CIFS Administration Guide:

For more information about Solaris CIFS, see the following:

This page includes the following procedures, which must be run as superuser or as a user with the "SMB Management" RBAC profile:

How to Install the Solaris CIFS Service Software (Solaris Express)

You can obtain the software packages for the Solaris CIFS service from the OpenSolaris Download Center.

The Solaris CIFS service packages are available beginning with the Solaris Express Developer Edition 1/08 (SXDE 1/08) and Solaris Express Community Edition build 79 (SXCE b79) releases. Use this procedure if you want to install these packages separately from the operating system.

The Solaris CIFS packages are SUNWsmbskr, SUNWsmbsr, and SUNWsmbsu.

  1. Download at least the SXDE 1/08 DVD or SXCE b79 image from the OpenSolaris Download Center.

    Go to the following URL:

    http://www.opensolaris.org/os/downloads

    Note - You must be registered at www.sun.com to access the images.

  2. Determine the device to be used for mounting the image file.

    # lofiadm -a sol-nv-bn-arch-dvd.iso

    Where n is the build number and arch is the architecture of the packages.

    For example:

    # lofiadm -a sol-nv-b84-sparc-dvd.iso

    /dev/lofi/1
  3. Mount the downloaded HSFS image on your system.

    # mount -F hsfs device mount-point

    device is the device name of the image and mount-point is the directory on which to mount the image.

    For example:

    # mount -F hsfs /dev/lofi/1 /mnt
  4. Install the Solaris CIFS service packages.

    # pkgadd -d mount-point/Solaris_11/Product SUNWsmbskr SUNWsmbsr SUNWsmbsu

    Note - Install the packages in the order shown to satisfy package dependencies.

    To uninstall the Solaris CIFS service with the pkgrm command, reverse the order of the packages shown on the pkgadd command line to satisfy package dependencies.

How to Install the Solaris CIFS Service Software (OpenSolaris)

When you have at least the OpenSolaris 2008.05 release installed, you can use the pkg command to install OpenSolaris packages automatically from the OpenSolaris package repository.

Use this procedure if you want to install these packages separately from the operating system.

Note - As of OpenSolaris Build 95, the SMF manifest file for the smb/server service is not imported by the intallation of the Solaris CIFS packages. Steps 2, 4, and 5 of this procedure work around the problem to ensure that you can successfully enable the service. An alternative workaround is to perform a post-installation reboot instead of performing Steps 2, 4, and 5.

The Solaris CIFS packages are SUNWsmbskr and SUNWsmbs.

  1. Log in to the system that is running the OpenSolaris 2008.05 release and become superuser.

  2. Remove the smbsrv module.

    # rem_drv smbsrv
  3. Install the Solaris CIFS service packages.

    # pkg install SUNWsmbskr

    # pkg install SUNWsmbs
  4. Load the smbsrv module.

    # add_drv smbsrv
  5. Import the Solaris CIFS service SMF manifest.

    # svccfg import /var/svc/manifest/network/smb/server.xml
  6. Join a workgroup or an AD domain.

How to Join a Workgroup

  1. Start the CIFS Service.

    # svcadm enable -r smb/server
  2. Join the workgroup.

    # smbadm join -w workgroup-name

    The default workgroup name is WORKGROUP. If you want to use the default, skip this step.

  3. Establish passwords for CIFS workgroup users.

    CIFS does not support UNIX or NIS style passwords. The SMB PAM module is required to generate CIFS style passwords. When the SMB PAM module is installed, the passwd command generates additional encrypted versions of each password that are suitable for use with CIFS.

    1. Install the PAM module.

      Add the following line to the end of the /etc/pam.conf file to support creation of an encrypted version of the user's password for CIFS.

      other password required pam_smb_passwd.so.1 nowarn

      Note - After the PAM module is installed, the passwd command automatically generates CIFS-suitable passwords for new users. You must also run the passwd command to generate CIFS-style passwords for existing users.

      Only a privileged user can modify the pam.conf file, for example:

      # pfexec gedit /etc/pam.conf
    2. Create local user passwords.

      # passwd username
  4. (Optional) Verify your Solaris CIFS service configuration.

    1. Download the cifs-chkcfg script.

    2. Run the cifs-chkcfg script.

      # cifs-chkcfg

      Note - The cifs-chkcfg script does not currently verify the Kerberos configuration.

How to Join an AD Domain

Before You Begin

This task describes how to join an AD domain and pertains to at least SXCE Build 82.

Determine your name mapping strategy and, if appropriate, create Solaris-to-Windows mapping rules. See "Creating Your Identity Mapping Strategy" in the Solaris CIFS Administration Guide.

Creating name-based mapping rules is optional and can be performed at any time. By default, identity mapping uses ephemeral mapping instead of name-based mapping.

  1. Start the CIFS Service.

    # svcadm enable -r smb/server
  2. Ensure that system clocks on the domain controller and the Solaris system are synchronized.

    For more information, see Step 3 of "How to Configure the Solaris CIFS Service in Domain Mode" in the Solaris CIFS Administration Guide.

  3. Join the domain.

    # smbadm join -u domain-user domain-name

    You must specify a user that has appropriate access rights to perform this step.

  4. Restart the CIFS Service.

    # svcadm restart smb/server
  5. (Optional) Verify your Solaris CIFS service configuration.

    1. Download the cifs-chkcfg script.

    2. Run the cifs-chkcfg script.

      # cifs-chkcfg

      Note - The cifs-chkcfg script does not currently verify the Kerberos configuration.

How to Create a CIFS Share

  1. Enable SMB sharing for the ZFS file system.

    • Enable SMB sharing for an existing ZFS file system.

      # zfs set sharesmb=on fsname

      For example, to enable SMB sharing for the ztank/myfs file system, type:

      # zfs set sharesmb=on ztank/myfs

      Note - The resource name for the share is automatically constructed by the zfs command when the share is created. The resource name is based on the dataset name, unless you specify a resource name. Any characters that are illegal for resource names are replaced by an underscore character (_).

      To specify a resource name for the share, specify a name for the sharesmb property, sharesmb=name=resource-name.

      For example, to specify a resource name of myfs for the ztank/myfs file system, type:

      # zfs set sharesmb=name=myfs ztank/myfs
    • Create a new ZFS file system that enables SMB sharing.

      When creating a ZFS file system to be used for SMB file sharing, set the casesensitivity option to mixed to permit a combination of case-sensitive and case-insensitive matching. Also, set the nbmand option to enforce mandatory cross-protocol share reservations and byte-range locking.

      # zfs create -o casesensitivity=mixed -o nbmand=on -o sharesmb=on fsname

      For example, to create a ZFS file system with SMB sharing and nbmand enabled for the ztank/yourfs file system, type:

      # zfs create -o casesensitivity=mixed -o nbmand=on -o sharesmb=on ztank/yourfs

      To specify a resource name for the share, specify a name for the sharesmb property, sharesmb=name=resource-name.

      For example, to specify a resource name of yourfs for the ztank/yourfs file system, type:

      # zfs create -o casesensitivity=mixed -o nbmand=on -o sharesmb=name=yourfs ztank/yourfs
  2. Verify how the new file system is shared.

    # sharemgr show -vp

    Now, you can access the share by connecting to //solaris-hostname/share-name. For information about how to access CIFS shares from your client, refer to the client documentation.

 
资源下载链接为: https://pan.quark.cn/s/9e7ef05254f8 在苹果的生态系统中,IAP(应用内购买)是苹果应用商店(App Store)中应用开发者常采用的一种盈利模式,允许用户在应用内直接购买虚拟商品或服务。苹果为开发者提供了一份详细的人民币(CNY)IAP定价表,这份定价表具有以下特点: 价格分级:定价表由多个价格等级组成,开发者可根据虚拟商品的价值选择相应等级,等级越高,价格越高。例如,低等级可能对应基础功能解锁,高等级则对应高级服务或大量虚拟道具。 税收与分成:苹果会从应用内购买金额中抽取30%作为服务费或佣金,这是苹果生态的固定规则。不过,开发者实际到手的收入会因不同国家和地区的税收政策而有所变化,但定价表中的价格等级本身是固定的,便于开发者统一管理。 多级定价策略:通过设置不同价格等级,开发者可以根据商品或服务的类型与价值进行合理定价,以满足不同消费能力的用户需求,从而最大化应用的总收入。例如,一款游戏可以通过设置不同等级的虚拟货币包,吸引不同付费意愿的玩家。 特殊等级:除了标准等级外,定价表还包含备用等级和特殊等级(如备用等级A、备用等级B等),这些等级可能是为应对特殊情况或促销活动而设置的额外价格点,为开发者提供了更灵活的定价选择。 苹果IAP定价表是开发者设计应用内购机制的重要参考。它不仅为开发者提供了标准的收入分成模型,还允许开发者根据产品特性设定价格等级,以适应市场和满足不同用户需求。同时,开发者在使用定价表时,还需严格遵守苹果的《App Store审查指南》,包括30%的分成政策、使用苹果支付接口、提供清晰的产品描述和定价信息等。苹果对应用内交易有严格规定,以确保交易的透明性和安全性。总之,苹果IAP定价表是开发者在应用内购设计中不可或缺的工具,但开发者也需密切关注苹果政策变化,以确保应用的合规运营和收益最大化。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值