Go to main content

Managing SMB File Sharing and Windows Interoperability in Oracle® Solaris 11.3

Exit Print View

Updated: December 2017
 
 

Importing User Mappings From a Rule-Mapping File

You use the idmap import command to import a set of rule-based user mappings that are stored in a file.

    The idmap supports the following file formats:

  • The NetApp usermap.cfg rule-mapping format:

    Windows-username [direction] UNIX-username

    Windows-username is a Windows user name in either the domain-name\username or username@domain-name format.

    UNIX-username is an Oracle Solaris user name.

      direction is one of the following:

    • == indicates a bidirectional mapping, which is the default

    • => or <= indicates a unidirectional mapping

    The IP qualifier is not supported.

  • The Samba smbusers rule-mapping format:

    UNIX-name = winname1 winname2 ...

    The mappings are imported as unidirectional mappings from one or more Windows names to an Oracle Solaris name.

    This format is based on the username map information on the smb.conf man page, which is available on the samba.org web site. The use of an asterisk (*) for winname is supported. However, the @group directive and the chaining of mappings are not supported.

    By default, if no mapping entries are in the smbusers file, Samba maps a winname to the equivalent UNIX-name, if any. The following idmap command shows this mapping:

    # idmap add -d winuser:"*@*" unixuser:"*"

How to Import User Mappings From a Rule-Mapping File

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  2. Import the user mappings from standard input or from a file.
    # idmap import [-F] [-f file] format

    In the following example, a file called myusermaps uses the usermap.cfg format to specify the following user name mappings:

    # cat myusermaps
    mary@example.com == mary
    maryb@example.com => mary

      You would use one of the following commands to add these mappings to the database:

    • # cat myusermaps | idmap import usermap.cfg

    • # idmap import -f myusermaps usermap.cfg