Error net ads join returned error 255

Код Приветствую!Согласно инструкции Пользователи успешно выгружаются из AD и отображаются в Битрикс24.Далее идёт конфигурация веб-сервера для организации SSO - 6. Manage sites in the pool > 7. Configure NTLM auth for all sites.Код Do you want to change NTLM settings for the server? (N|y): y NetBIOS Domain/Workgroup Name (ex. TEST): EXAMPLE NetBIOS Hostname (default srvweb): srvweb Full Domain Name: (default CORP.EXAMPLE.RU): CORP.EXAMPLE.RU Domain password server (default...

Приветствую!

Согласно инструкции

https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=37&LESSON_ID=8859&LESSON_PATH=3908.8809.8847.8859

Пользователи успешно выгружаются из AD и отображаются в Битрикс24.
Далее идёт конфигурация веб-сервера для организации SSO — 6. Manage sites in the pool > 7. Configure NTLM auth for all sites.

Код
Do you want to change NTLM settings for the server? (N|y): y
NetBIOS Domain/Workgroup Name (ex. TEST): EXAMPLE
NetBIOS Hostname (default srvweb): srvweb
Full Domain Name: (default CORP.EXAMPLE.RU): CORP.EXAMPLE.RU
Domain password server (default dc01.corp.EXAMPLE.ru): dc01.CORP.EXAMPLE.RU
Domain admin user name (default Administrator): adm
Domain admin user password:
NTLM Settings:
------------------------------------------------------------------------------------
NetBIOS Domain      : EXAMPLE
NetBIOS Hostname    : srvweb
Full Domain Name    : CORP.EXAMPLE.RU
Password Server     : dc01.CORP.EXAMPLE.RU
Domain User         : adm
------------------------------------------------------------------------------------
The site and its shared sites will be configured to use NTLM.
Enter the site name (default): m.dev.EXAMPLE.ru
NTLM settings found on the site m.dev.EXAMPLE.ru.
Do you want to change them? (N|y): y
Please confirm you want to enable NTLM (N|y): y

Задача завершается с ошибкой, лог ошибки:

Код
PLAY [bitrix-hosts] ************************************************************

TASK [setup] *******************************************************************
ok: [server1]

TASK [web : include variables fr om mysql group] ********************************
ok: [server1]

TASK [web : include variables from web group] **********************************
ok: [server1]

TASK [web : include variables from temporary config] ***************************
ok: [server1]

TASK [web : additional gathering facts] ****************************************
ok: [server1]

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************

TASK [web : include] ***********************************************************
included: /etc/ansible/roles/web/tasks/create_ntlm.yml for server1

TASK [web : gathering facts about installed sites with the same DB] ************
changed: [server1]

TASK [web : create variable bx_sites_info - all sites with the same DB] ********
ok: [server1]

TASK [web : gathering facts about installed kernel site with defined DB] *******
changed: [server1]

TASK [web : create variable bx_kernel_site - installed kernel site with defined DB] ***
ok: [server1]

TASK [web : include] ***********************************************************
included: /etc/ansible/roles/web/tasks/samba_configs.yml for server1

TASK [web : ntlm_pass variable] ************************************************
ok: [server1]

TASK [web : install samba packages Centos7] ************************************
ok: [server1] => (item=[u'samba', u'samba-winbind', u'samba-common', u'samba-client', u'samba-winbind-clients',                                                                                                                           u'mod_auth_ntlm_winbind'])

TASK [web : remove samba packages on Centos6] **********************************

TASK [web : install samba4 packages on Centos6] ********************************

TASK [web : get current winbind status] ****************************************
ok: [server1]

TASK [web : shutdown smb and winbind service] **********************************
ok: [server1] => (item=winbind)
ok: [server1] => (item=smb)

TASK [web : delete cache files from samba] *************************************
ok: [server1] => (item=serverid.tdb)
ok: [server1] => (item=winbindd_cache.tdb)
ok: [server1] => (item=winbindd_idmap.tdb)
ok: [server1] => (item=winbindd_privileged/pipe)

TASK [web : create samba config] ***********************************************
changed: [server1]

TASK [web : create kerberos config] ********************************************
ok: [server1]

TASK [web : update login sources in /etc/nsswitch.conf] ************************
ok: [server1]

TASK [web : update group sources in /etc/nsswitch.conf] ************************
ok: [server1]

TASK [web : update password sources in /etc/nsswitch.conf] *********************
ok: [server1]

TASK [web : update domain in /etc/resolv.conf - search] ************************
ok: [server1]

TASK [web : update domain in /etc/resolv.conf - domain] ************************
ok: [server1]

TASK [web : add bitrix to wbpriv group] ****************************************
ok: [server1]

TASK [web : generate file name for temporary save admin settings] **************
ok: [server1]

TASK [web : temp directory] ****************************************************
ok: [server1]

TASK [web : save password info to the the file] ********************************
changed: [server1]

TASK [web : join the ADS domain] ***********************************************
fatal: [server1]: FAILED! => {"changed": false, "failed": true, "msg": "Error: net ads join returned error=255"}

NO MORE HOSTS LEFT *************************************************************
        to retry, use: --lim it @/etc/ansible/web.retry

PLAY RECAP *********************************************************************
server1                    : ok=27   changed=4    unreachable=0    failed=1

Какие могут быть варианты решения?

  1. Another «‘net usershare’ returned error 255:»

    Esteemed Ubuntu Users & Devs,

    Some how i’ve buggered my ability to share anything from my Ubuntu install.

    This message:

    ‘net usershare’ returned error 255: net usershare add: cannot convert name «Everyone» to a SID. Invalid parameter.

    keeps appearing when ever i try to share my own «Public» folder including ticking «Allow others to create and delet files in this folder»

    I’ve tried purging and reinstalling samba and related packges per tips from similar threads. All to no avail. Its rather killing me and i’d be ever so gratful if some one could help me trouble shoot this *&$# which is preventing me from migrating my data from the old ******* pc onto the shiny new 11.10 machine. With the goal to getting this machine accessible from windows.

    FWIW, my entire smb.conf file (sans comment preface) and also the permissions on the public folder below.

    thanks in advance, KB

    Code:

    $ ls -l ~/Public
    total 4
    drwxrwxr-x 2 karl karl 4096 2012-02-17 21:39
    
    <snip>
    #======================= Global Settings =======================
    
    [global]
    
    ## Browsing/Identification ###
    
    # Change this to the workgroup/NT-domain name your Samba server will part of
       workgroup = WORKGROUP
    
    # server string is the equivalent of the NT Description field
       server string = %h server (Samba, Ubuntu)
    
    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
    #   wins support = no
    
    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    ;   wins server = w.x.y.z
    
    # This will prevent nmbd to search for NetBIOS names through DNS.
       dns proxy = no
    
    # What naming service and in what order should we use to resolve host names
    # to IP addresses
    ;   name resolve order = lmhosts host wins bcast
    
    #### Networking ####
    
    # The specific set of interfaces / networks to bind to
    # This can be either the interface name or an IP address/netmask;
    # interface names are normally preferred
    ;   interfaces = 127.0.0.0/8 eth0
    
    # Only bind to the named interfaces and/or networks; you must use the
    # 'interfaces' option above to use this.
    # It is recommended that you enable this feature if your Samba machine is
    # not protected by a firewall or is a firewall itself.  However, this
    # option cannot handle dynamic or non-broadcast interfaces correctly.
    ;   bind interfaces only = yes
    
    
    
    #### Debugging/Accounting ####
    
    # This tells Samba to use a separate log file for each machine
    # that connects
       log file = /var/log/samba/log.%m
    
    # Cap the size of the individual log files (in KiB).
       max log size = 1000
    
    # If you want Samba to only log through syslog then set the following
    # parameter to 'yes'.
    #   syslog only = no
    
    # We want Samba to log a minimum amount of information to syslog. Everything
    # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
    # through syslog you should set the following parameter to something higher.
       syslog = 0
    
    # Do something sensible when Samba crashes: mail the admin a backtrace
       panic action = /usr/share/samba/panic-action %d
    
    
    ####### Authentication #######
    
    # "security = user" is always a good idea. This will require a Unix account
    # in this server for every user accessing the server. See
    # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
    # in the samba-doc package for details.
    #   security = user
    
    # You may wish to use password encryption.  See the section on
    # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
       encrypt passwords = false
    
    # If you are using encrypted passwords, Samba will need to know what
    # password database type you are using.  
       passdb backend = tdbsam
    
       obey pam restrictions = yes
    
    # This boolean parameter controls whether Samba attempts to sync the Unix
    # password with the SMB password when the encrypted SMB password in the
    # passdb is changed.
       unix password sync = yes
    
    # For Unix password sync to work on a Debian GNU/Linux system, the following
    # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
    # sending the correct chat script for the passwd program in Debian Sarge).
       passwd program = /usr/bin/passwd %u
       passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
    
    # This boolean controls whether PAM will be used for password changes
    # when requested by an SMB client instead of the program listed in
    # 'passwd program'. The default is 'no'.
       pam password change = yes
    
    # This option controls how unsuccessful authentication attempts are mapped
    # to anonymous connections
       map to guest = bad user
    
    ########## Domains ###########
    
    # Is this machine able to authenticate users. Both PDC and BDC
    # must have this setting enabled. If you are the BDC you must
    # change the 'domain master' setting to no
    #
    ;   domain logons = yes
    #
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of the user's profile directory
    # from the client point of view)
    # The following required a [profiles] share to be setup on the
    # samba server (see below)
    ;   logon path = \%Nprofiles%U
    # Another common choice is storing the profile in the user's home directory
    # (this is Samba's default)
    #   logon path = \%N%Uprofile
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of a user's home directory (from the client
    # point of view)
    ;   logon drive = H:
    #   logon home = \%N%U
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the script to run during logon. The script must be stored
    # in the [netlogon] share
    # NOTE: Must be store in 'DOS' file format convention
    ;   logon script = logon.cmd
    
    # This allows Unix users to be created on the domain controller via the SAMR
    # RPC pipe.  The example command creates a user account with a disabled Unix
    # password; please adapt to your needs
    ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
    
    # This allows machine accounts to be created on the domain controller via the 
    # SAMR RPC pipe.  
    # The following assumes a "machines" group exists on the system
    ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
    
    # This allows Unix groups to be created on the domain controller via the SAMR
    # RPC pipe.  
    ; add group script = /usr/sbin/addgroup --force-badname %g
    
    ########## Printing ##########
    
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    #   load printers = yes
    
    # lpr(ng) printing. You may wish to override the location of the
    # printcap file
    ;   printing = bsd
    ;   printcap name = /etc/printcap
    
    # CUPS printing.  See also the cupsaddsmb(8) manpage in the
    # cupsys-client package.
    ;   printing = cups
    ;   printcap name = cups
    
    ############ Misc ############
    
    # Using the following line enables you to customise your configuration
    # on a per machine basis. The %m gets replaced with the netbios name
    # of the machine that is connecting
    ;   include = /home/samba/etc/smb.conf.%m
    
    # Most people will find that this option gives better performance.
    # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
    # for details
    # You may want to add the following on a Linux system:
    #         SO_RCVBUF=8192 SO_SNDBUF=8192
    #   socket options = TCP_NODELAY
    
    # The following parameter is useful only if you have the linpopup package
    # installed. The samba maintainer and the linpopup maintainer are
    # working to ease installation and configuration of linpopup and samba.
    ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
    
    # Domain Master specifies Samba to be the Domain Master Browser. If this
    # machine will be configured as a BDC (a secondary logon server), you
    # must set this to 'no'; otherwise, the default behavior is recommended.
    #   domain master = auto
    
    # Some defaults for winbind (make sure you're not using the ranges
    # for something else.)
    ;   idmap uid = 10000-20000
    ;   idmap gid = 10000-20000
    ;   template shell = /bin/bash
    
    # The following was the default behaviour in sarge,
    # but samba upstream reverted the default because it might induce
    # performance issues in large organizations.
    # See Debian bug #368251 for some of the consequences of *not*
    # having this setting and smb.conf(5) for details.
    ;   winbind enum groups = yes
    ;   winbind enum users = yes
    
    # Setup usershare options to enable non-root users to share folders
    # with the net usershare command.
    
    # Maximum number of usershare. 0 (default) means that usershare is disabled.
    ;   usershare max shares = 100
    
    # Allow users who've been granted usershare privileges to create
    # public shares, not just authenticated ones
       usershare allow guests = yes
    
    #======================= Share Definitions =======================
    
    # Un-comment the following (and tweak the other settings below to suit)
    # to enable the default home directory shares. This will share each 
    # user's home director as \serverusername
    ;[homes]
    ;   comment = Home Directories
    ;   browseable = no
    
    # By default, the home directories are exported read-only. Change the
    # next parameter to 'no' if you want to be able to write to them.
    ;   read only = yes
    
    # File creation mask is set to 0700 for security reasons. If you want to
    # create files with group=rw permissions, set next parameter to 0775.
    ;   create mask = 0700
    
    # Directory creation mask is set to 0700 for security reasons. If you want to
    # create dirs. with group=rw permissions, set next parameter to 0775.
    ;   directory mask = 0700
    
    # By default, \serverusername shares can be connected to by anyone
    # with access to the samba server. Un-comment the following parameter
    # to make sure that only "username" can connect to \serverusername
    # The following parameter makes sure that only "username" can connect
    #
    # This might need tweaking when using external authentication schemes
    ;   valid users = %S
    
    # Un-comment the following and create the netlogon directory for Domain Logons
    # (you need to configure Samba to act as a domain controller too.)
    ;[netlogon]
    ;   comment = Network Logon Service
    ;   path = /home/samba/netlogon
    ;   guest ok = yes
    ;   read only = yes
    
    # Un-comment the following and create the profiles directory to store
    # users profiles (see the "logon path" option above)
    # (you need to configure Samba to act as a domain controller too.)
    # The path below should be writable by all users so that their
    # profile directory may be created the first time they log on
    ;[profiles]
    ;   comment = Users profiles
    ;   path = /home/samba/profiles
    ;   guest ok = no
    ;   browseable = no
    ;   create mask = 0600
    ;   directory mask = 0700
    
    [printers]
       comment = All Printers
       browseable = no
       path = /var/spool/samba
       printable = yes
       guest ok = no
       read only = yes
       create mask = 0700
    
    # Windows clients look for this share name as a source of downloadable
    # printer drivers
    [print$]
       comment = Printer Drivers
       path = /var/lib/samba/printers
       browseable = yes
       read only = yes
       guest ok = no
    # Uncomment to allow remote administration of Windows print drivers.
    # You may need to replace 'lpadmin' with the name of the group your
    # admin users are members of.
    # Please note that you also need to set appropriate Unix permissions
    # to the drivers directory for these users to have write rights in it
    ;   write list = root, @lpadmin
    
    # A sample share for sharing your CD-ROM with others.
    ;[cdrom]
    ;   comment = Samba server's CD-ROM
    ;   read only = yes
    ;   locking = no
    ;   path = /cdrom
    ;   guest ok = yes
    
    # The next two parameters show how to auto-mount a CD-ROM when the
    #    cdrom share is accesed. For this to work /etc/fstab must contain
    #    an entry like this:
    #
    #       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
    #
    # The CD-ROM gets unmounted automatically after the connection to the
    #
    # If you don't want to use auto-mounting/unmounting make sure the CD
    #    is mounted on /cdrom
    #
    ;   preexec = /bin/mount /cdrom
    ;   postexec = /bin/umount /cdrom

    Last edited by coffeecat; February 17th, 2012 at 11:12 PM.

    Reason: Added code tags — please use code tags where appropriate


  2. Re: Another «‘net usershare’ returned error 255:»

    Still hoping for some pointers on straitening out my Samba and getting this Ubuntu machine visible on the windows network..anyone?


  3. Re: Another «‘net usershare’ returned error 255:»

    Dutch too huh?

    I’ll start in english.

    Execute the following in a terminal:

    And get the ip-addr out of it.
    I’ll give you my output to show how:

    Code:

    eth0      Link encap:Ethernet  HWaddr 00:50:8b:6c:be:f7  
              inet addr:192.168.0.115  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::250:8bff:fe6c:bef7/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:82518 errors:0 dropped:0 overruns:0 frame:0
              TX packets:77726 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:86613827 (86.6 MB)  TX bytes:65692349 (65.6 MB)
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:64 errors:0 dropped:0 overruns:0 frame:0
              TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:4176 (4.1 KB)  TX bytes:4176 (4.1 KB)

    I need the IP of eth0, it’s the inet addr field (192.168.0.115).

    Open your windows machine, click on «Deze Computer» (my computer) and type this in the url-bar:
    \<ip>
    In my case:
    \192.168.0.115

    And see if it works.

    In dutch:
    Als je nog andere vragen hebt of als het niet lukt, moet je me PM’en, ik ben slecht in het bijhouden van threads.

    Last edited by roelforg; February 21st, 2012 at 04:50 PM.


  4. Re: Another «‘net usershare’ returned error 255:»

    Right,
    I’ll include my smb.conf, it works on my pc.

    You copy/paste it to a new file named smb.conf in your home dir.
    Then run this in a terminal (substitute <username> with your username):

    Code:

    sudo bash
    mkdir /myshare
    chown -R <username> /myshare/
    cd /etc/samba
    mv smb.conf smb.conf.old
    cp /home/<username>/smb.conf .
    chmod 644 smb.conf

    reboot
    now copy some files to /myshare
    and see if your win pc can see it
    if it doesn’t work, let me know (pm me again) and i’ll give you the instructions for restoring your smb.conf to before and i’ll try to help you.

    smb.conf:

    Code:

    #
    # Sample configuration file for the Samba suite for Debian GNU/Linux.
    #
    #
    # This is the main Samba configuration file. You should read the
    # smb.conf(5) manual page in order to understand the options listed
    # here. Samba has a huge number of configurable options most of which 
    # are not shown in this example
    #
    # Some options that are often worth tuning have been included as
    # commented-out examples in this file.
    #  - When such options are commented with ";", the proposed setting
    #    differs from the default Samba behaviour
    #  - When commented with "#", the proposed setting is the default
    #    behaviour of Samba but the option is considered important
    #    enough to be mentioned here
    #
    # NOTE: Whenever you modify this file you should run the command
    # "testparm" to check that you have not made any basic syntactic 
    # errors. 
    # A well-established practice is to name the original file
    # "smb.conf.master" and create the "real" config file with
    # testparm -s smb.conf.master >smb.conf
    # This minimizes the size of the really used smb.conf file
    # which, according to the Samba Team, impacts performance
    # However, use this with caution if your smb.conf file contains nested
    # "include" statements. See Debian bug #483187 for a case
    # where using a master file is not a good idea.
    #
    
    #======================= Global Settings =======================
    
    [global]
    
    ## Browsing/Identification ###
    
    # Change this to the workgroup/NT-domain name your Samba server will part of
       workgroup = WORKGROUP
    
    # server string is the equivalent of the NT Description field
       server string = %h server (Samba, Ubuntu)
    
    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
    #   wins support = no
    
    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    ;   wins server = w.x.y.z
    
    # This will prevent nmbd to search for NetBIOS names through DNS.
       dns proxy = no
    
    # What naming service and in what order should we use to resolve host names
    # to IP addresses
    ;   name resolve order = lmhosts host wins bcast
    
    #### Networking ####
    
    # The specific set of interfaces / networks to bind to
    # This can be either the interface name or an IP address/netmask;
    # interface names are normally preferred
    ;   interfaces = 127.0.0.0/8 eth0
    
    # Only bind to the named interfaces and/or networks; you must use the
    # 'interfaces' option above to use this.
    # It is recommended that you enable this feature if your Samba machine is
    # not protected by a firewall or is a firewall itself.  However, this
    # option cannot handle dynamic or non-broadcast interfaces correctly.
    ;   bind interfaces only = yes
    
    
    
    #### Debugging/Accounting ####
    
    # This tells Samba to use a separate log file for each machine
    # that connects
       log file = /var/log/samba/log.%m
    
    # Cap the size of the individual log files (in KiB).
       max log size = 1000
    
    # If you want Samba to only log through syslog then set the following
    # parameter to 'yes'.
    #   syslog only = no
    
    # We want Samba to log a minimum amount of information to syslog. Everything
    # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
    # through syslog you should set the following parameter to something higher.
       syslog = 0
    
    # Do something sensible when Samba crashes: mail the admin a backtrace
       panic action = /usr/share/samba/panic-action %d
    
    
    ####### Authentication #######
    
    # "security = user" is always a good idea. This will require a Unix account
    # in this server for every user accessing the server. See
    # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
    # in the samba-doc package for details.
    #   security = user
    
    # You may wish to use password encryption.  See the section on
    # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
       encrypt passwords = true
    
    # If you are using encrypted passwords, Samba will need to know what
    # password database type you are using.  
       passdb backend = tdbsam
    
       obey pam restrictions = yes
    
    # This boolean parameter controls whether Samba attempts to sync the Unix
    # password with the SMB password when the encrypted SMB password in the
    # passdb is changed.
       unix password sync = yes
    
    # For Unix password sync to work on a Debian GNU/Linux system, the following
    # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
    # sending the correct chat script for the passwd program in Debian Sarge).
       passwd program = /usr/bin/passwd %u
       passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
    
    # This boolean controls whether PAM will be used for password changes
    # when requested by an SMB client instead of the program listed in
    # 'passwd program'. The default is 'no'.
       pam password change = yes
    
    # This option controls how unsuccessful authentication attempts are mapped
    # to anonymous connections
       map to guest = bad user
    
    ########## Domains ###########
    
    # Is this machine able to authenticate users. Both PDC and BDC
    # must have this setting enabled. If you are the BDC you must
    # change the 'domain master' setting to no
    #
    ;   domain logons = yes
    #
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of the user's profile directory
    # from the client point of view)
    # The following required a [profiles] share to be setup on the
    # samba server (see below)
    ;   logon path = \%Nprofiles%U
    # Another common choice is storing the profile in the user's home directory
    # (this is Samba's default)
    #   logon path = \%N%Uprofile
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of a user's home directory (from the client
    # point of view)
    ;   logon drive = H:
    #   logon home = \%N%U
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the script to run during logon. The script must be stored
    # in the [netlogon] share
    # NOTE: Must be store in 'DOS' file format convention
    ;   logon script = logon.cmd
    
    # This allows Unix users to be created on the domain controller via the SAMR
    # RPC pipe.  The example command creates a user account with a disabled Unix
    # password; please adapt to your needs
    ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
    
    # This allows machine accounts to be created on the domain controller via the 
    # SAMR RPC pipe.  
    # The following assumes a "machines" group exists on the system
    ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
    
    # This allows Unix groups to be created on the domain controller via the SAMR
    # RPC pipe.  
    ; add group script = /usr/sbin/addgroup --force-badname %g
    
    ########## Printing ##########
    
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    #   load printers = yes
    
    # lpr(ng) printing. You may wish to override the location of the
    # printcap file
    ;   printing = bsd
    ;   printcap name = /etc/printcap
    
    # CUPS printing.  See also the cupsaddsmb(8) manpage in the
    # cupsys-client package.
    ;   printing = cups
    ;   printcap name = cups
    
    ############ Misc ############
    
    # Using the following line enables you to customise your configuration
    # on a per machine basis. The %m gets replaced with the netbios name
    # of the machine that is connecting
    ;   include = /home/samba/etc/smb.conf.%m
    
    # Most people will find that this option gives better performance.
    # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
    # for details
    # You may want to add the following on a Linux system:
    #         SO_RCVBUF=8192 SO_SNDBUF=8192
    #   socket options = TCP_NODELAY
    
    # The following parameter is useful only if you have the linpopup package
    # installed. The samba maintainer and the linpopup maintainer are
    # working to ease installation and configuration of linpopup and samba.
    ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
    
    # Domain Master specifies Samba to be the Domain Master Browser. If this
    # machine will be configured as a BDC (a secondary logon server), you
    # must set this to 'no'; otherwise, the default behavior is recommended.
    #   domain master = auto
    
    # Some defaults for winbind (make sure you're not using the ranges
    # for something else.)
    ;   idmap uid = 10000-20000
    ;   idmap gid = 10000-20000
    ;   template shell = /bin/bash
    
    # The following was the default behaviour in sarge,
    # but samba upstream reverted the default because it might induce
    # performance issues in large organizations.
    # See Debian bug #368251 for some of the consequences of *not*
    # having this setting and smb.conf(5) for details.
    ;   winbind enum groups = yes
    ;   winbind enum users = yes
    
    # Setup usershare options to enable non-root users to share folders
    # with the net usershare command.
    
    # Maximum number of usershare. 0 (default) means that usershare is disabled.
    ;   usershare max shares = 100
    
    # Allow users who've been granted usershare privileges to create
    # public shares, not just authenticated ones
       usershare allow guests = yes
    
    #======================= Share Definitions =======================
    
    # Un-comment the following (and tweak the other settings below to suit)
    # to enable the default home directory shares. This will share each 
    # user's home director as \serverusername
    ;[homes]
    ;   comment = Home Directories
    ;   browseable = no
    
    # By default, the home directories are exported read-only. Change the
    # next parameter to 'no' if you want to be able to write to them.
    ;   read only = yes
    
    # File creation mask is set to 0700 for security reasons. If you want to
    # create files with group=rw permissions, set next parameter to 0775.
    ;   create mask = 0700
    
    # Directory creation mask is set to 0700 for security reasons. If you want to
    # create dirs. with group=rw permissions, set next parameter to 0775.
    ;   directory mask = 0700
    
    # By default, \serverusername shares can be connected to by anyone
    # with access to the samba server. Un-comment the following parameter
    # to make sure that only "username" can connect to \serverusername
    # The following parameter makes sure that only "username" can connect
    #
    # This might need tweaking when using external authentication schemes
    ;   valid users = %S
    
    # Un-comment the following and create the netlogon directory for Domain Logons
    # (you need to configure Samba to act as a domain controller too.)
    ;[netlogon]
    ;   comment = Network Logon Service
    ;   path = /home/samba/netlogon
    ;   guest ok = yes
    ;   read only = yes
    
    # Un-comment the following and create the profiles directory to store
    # users profiles (see the "logon path" option above)
    # (you need to configure Samba to act as a domain controller too.)
    # The path below should be writable by all users so that their
    # profile directory may be created the first time they log on
    ;[profiles]
    ;   comment = Users profiles
    ;   path = /home/samba/profiles
    ;   guest ok = no
    ;   browseable = no
    ;   create mask = 0600
    ;   directory mask = 0700
    
    [printers]
       comment = All Printers
       browseable = no
       path = /var/spool/samba
       printable = yes
       guest ok = no
       read only = yes
       create mask = 0700
    
    # Windows clients look for this share name as a source of downloadable
    # printer drivers
    [print$]
       comment = Printer Drivers
       path = /var/lib/samba/printers
       browseable = yes
       read only = yes
       guest ok = no
    # Uncomment to allow remote administration of Windows print drivers.
    # You may need to replace 'lpadmin' with the name of the group your
    # admin users are members of.
    # Please note that you also need to set appropriate Unix permissions
    # to the drivers directory for these users to have write rights in it
    ;   write list = root, @lpadmin
    
    # A sample share for sharing your CD-ROM with others.
    ;[cdrom]
    ;   comment = Samba server's CD-ROM
    ;   read only = yes
    ;   locking = no
    ;   path = /cdrom
    ;   guest ok = yes
    
    # The next two parameters show how to auto-mount a CD-ROM when the
    #    cdrom share is accesed. For this to work /etc/fstab must contain
    #    an entry like this:
    #
    #       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
    #
    # The CD-ROM gets unmounted automatically after the connection to the
    #
    # If you don't want to use auto-mounting/unmounting make sure the CD
    #    is mounted on /cdrom
    #
    ;   preexec = /bin/mount /cdrom
    ;   postexec = /bin/umount /cdrom
    
    [share]
        comment = Ubuntu File Server Share
        path = /myshare
        browsable = yes
        guest ok = yes
        read only = no
        create mask = 0755


  5. Re: Another «‘net usershare’ returned error 255:»

    Success!

    Not only can i see /myshare (and put a file from my windows into it — hooray), i can now also see one of the shares i tried to make earlier, which is /home/karl i.e. my own home folder.

    Which makes me wonder if this is why i was getting the error — trying to share a folder *within* a folder that’s already shared!? Easy to test.

    Now i just need to understand what you did to solve my issue. And also how to control access to the shared folder, i.e., require a password from the win machine to access, or not.

    Hardstikke bedankt voor uw geduld, tijd & moeite doden dit probleem voor mij!


  6. Re: Another «‘net usershare’ returned error 255:»

    Sure!

    I think it should show a share named «share» right?

    Post your entire /etc/samba/smb.conf.old (i created a backup as part of the process i gave you).
    I’ll mod it so it’ll have all your old shares with the new (working) config.

    Pm me when posted!


  7. Re: Another «‘net usershare’ returned error 255:»

    Quote Originally Posted by kbrand
    View Post

    Success!

    Not only can i see /myshare (and put a file from my windows into it — hooray), i can now also see one of the shares i tried to make earlier, which is /home/karl i.e. my own home folder.

    Which makes me wonder if this is why i was getting the error — trying to share a folder *within* a folder that’s already shared!? Easy to test.

    Now i just need to understand what you did to solve my issue. And also how to control access to the shared folder, i.e., require a password from the win machine to access, or not.

    Hardstikke bedankt voor uw geduld, tijd & moeite doden dit probleem voor mij!

    FYI: The sharing of the folder within the folder shouldn’t matter.
    Also, each share has to be named different.

    The stuff on http://www.samba.org/samba/docs/man/…TO-Collection/ is maybe a little complex, but if you give it a good thorough read, it should help ya.


  8. Re: Another «‘net usershare’ returned error 255:»

    Yes, the newly created /myshare appears as «share» with the files therein.

    Thanks for the FYI and will def. check out the link since another ubuntu mchine will soon be joining this network.

    Big thanks again!

    «/etc/samba/smb.conf.old» below:

    Code:

    #
    # Sample configuration file for the Samba suite for Debian GNU/Linux.
    #
    #
    # This is the main Samba configuration file. You should read the
    # smb.conf(5) manual page in order to understand the options listed
    # here. Samba has a huge number of configurable options most of which 
    # are not shown in this example
    #
    # Some options that are often worth tuning have been included as
    # commented-out examples in this file.
    #  - When such options are commented with ";", the proposed setting
    #    differs from the default Samba behaviour
    #  - When commented with "#", the proposed setting is the default
    #    behaviour of Samba but the option is considered important
    #    enough to be mentioned here
    #
    # NOTE: Whenever you modify this file you should run the command
    # "testparm" to check that you have not made any basic syntactic 
    # errors. 
    # A well-established practice is to name the original file
    # "smb.conf.master" and create the "real" config file with
    # testparm -s smb.conf.master >smb.conf
    # This minimizes the size of the really used smb.conf file
    # which, according to the Samba Team, impacts performance
    # However, use this with caution if your smb.conf file contains nested
    # "include" statements. See Debian bug #483187 for a case
    # where using a master file is not a good idea.
    #
    
    #======================= Global Settings =======================
    
    [global]
    
    ## Browsing/Identification ###
    
    # Change this to the workgroup/NT-domain name your Samba server will part of
       workgroup = WORKGROUP
    
    # server string is the equivalent of the NT Description field
       server string = %h server (Samba, Ubuntu)
    
    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
    #   wins support = no
    
    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    ;   wins server = w.x.y.z
    
    # This will prevent nmbd to search for NetBIOS names through DNS.
       dns proxy = no
    
    # What naming service and in what order should we use to resolve host names
    # to IP addresses
    ;   name resolve order = lmhosts host wins bcast
    
    #### Networking ####
    
    # The specific set of interfaces / networks to bind to
    # This can be either the interface name or an IP address/netmask;
    # interface names are normally preferred
    ;   interfaces = 127.0.0.0/8 eth0
    
    # Only bind to the named interfaces and/or networks; you must use the
    # 'interfaces' option above to use this.
    # It is recommended that you enable this feature if your Samba machine is
    # not protected by a firewall or is a firewall itself.  However, this
    # option cannot handle dynamic or non-broadcast interfaces correctly.
    ;   bind interfaces only = yes
    
    
    
    #### Debugging/Accounting ####
    
    # This tells Samba to use a separate log file for each machine
    # that connects
       log file = /var/log/samba/log.%m
    
    # Cap the size of the individual log files (in KiB).
       max log size = 1000
    
    # If you want Samba to only log through syslog then set the following
    # parameter to 'yes'.
    #   syslog only = no
    
    # We want Samba to log a minimum amount of information to syslog. Everything
    # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
    # through syslog you should set the following parameter to something higher.
       syslog = 0
    
    # Do something sensible when Samba crashes: mail the admin a backtrace
       panic action = /usr/share/samba/panic-action %d
    
    
    ####### Authentication #######
    
    # "security = user" is always a good idea. This will require a Unix account
    # in this server for every user accessing the server. See
    # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
    # in the samba-doc package for details.
    #   security = user
    
    # You may wish to use password encryption.  See the section on
    # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
       encrypt passwords = false
    
    # If you are using encrypted passwords, Samba will need to know what
    # password database type you are using.  
       passdb backend = tdbsam
    
       obey pam restrictions = yes
    
    # This boolean parameter controls whether Samba attempts to sync the Unix
    # password with the SMB password when the encrypted SMB password in the
    # passdb is changed.
       unix password sync = yes
    
    # For Unix password sync to work on a Debian GNU/Linux system, the following
    # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
    # sending the correct chat script for the passwd program in Debian Sarge).
       passwd program = /usr/bin/passwd %u
       passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
    
    # This boolean controls whether PAM will be used for password changes
    # when requested by an SMB client instead of the program listed in
    # 'passwd program'. The default is 'no'.
       pam password change = yes
    
    # This option controls how unsuccessful authentication attempts are mapped
    # to anonymous connections
       map to guest = bad user
    
    ########## Domains ###########
    
    # Is this machine able to authenticate users. Both PDC and BDC
    # must have this setting enabled. If you are the BDC you must
    # change the 'domain master' setting to no
    #
    ;   domain logons = yes
    #
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of the user's profile directory
    # from the client point of view)
    # The following required a [profiles] share to be setup on the
    # samba server (see below)
    ;   logon path = \%Nprofiles%U
    # Another common choice is storing the profile in the user's home directory
    # (this is Samba's default)
    #   logon path = \%N%Uprofile
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of a user's home directory (from the client
    # point of view)
    ;   logon drive = H:
    #   logon home = \%N%U
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the script to run during logon. The script must be stored
    # in the [netlogon] share
    # NOTE: Must be store in 'DOS' file format convention
    ;   logon script = logon.cmd
    
    # This allows Unix users to be created on the domain controller via the SAMR
    # RPC pipe.  The example command creates a user account with a disabled Unix
    # password; please adapt to your needs
    ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
    
    # This allows machine accounts to be created on the domain controller via the 
    # SAMR RPC pipe.  
    # The following assumes a "machines" group exists on the system
    ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
    
    # This allows Unix groups to be created on the domain controller via the SAMR
    # RPC pipe.  
    ; add group script = /usr/sbin/addgroup --force-badname %g
    
    ########## Printing ##########
    
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    #   load printers = yes
    
    # lpr(ng) printing. You may wish to override the location of the
    # printcap file
    ;   printing = bsd
    ;   printcap name = /etc/printcap
    
    # CUPS printing.  See also the cupsaddsmb(8) manpage in the
    # cupsys-client package.
    ;   printing = cups
    ;   printcap name = cups
    
    ############ Misc ############
    
    # Using the following line enables you to customise your configuration
    # on a per machine basis. The %m gets replaced with the netbios name
    # of the machine that is connecting
    ;   include = /home/samba/etc/smb.conf.%m
    
    # Most people will find that this option gives better performance.
    # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
    # for details
    # You may want to add the following on a Linux system:
    #         SO_RCVBUF=8192 SO_SNDBUF=8192
    #   socket options = TCP_NODELAY
    
    # The following parameter is useful only if you have the linpopup package
    # installed. The samba maintainer and the linpopup maintainer are
    # working to ease installation and configuration of linpopup and samba.
    ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
    
    # Domain Master specifies Samba to be the Domain Master Browser. If this
    # machine will be configured as a BDC (a secondary logon server), you
    # must set this to 'no'; otherwise, the default behavior is recommended.
    #   domain master = auto
    
    # Some defaults for winbind (make sure you're not using the ranges
    # for something else.)
    ;   idmap uid = 10000-20000
    ;   idmap gid = 10000-20000
    ;   template shell = /bin/bash
    
    # The following was the default behaviour in sarge,
    # but samba upstream reverted the default because it might induce
    # performance issues in large organizations.
    # See Debian bug #368251 for some of the consequences of *not*
    # having this setting and smb.conf(5) for details.
    ;   winbind enum groups = yes
    ;   winbind enum users = yes
    
    # Setup usershare options to enable non-root users to share folders
    # with the net usershare command.
    
    # Maximum number of usershare. 0 (default) means that usershare is disabled.
    ;   usershare max shares = 100
    
    # Allow users who've been granted usershare privileges to create
    # public shares, not just authenticated ones
       usershare allow guests = yes
    
    #======================= Share Definitions =======================
    
    # Un-comment the following (and tweak the other settings below to suit)
    # to enable the default home directory shares. This will share each 
    # user's home director as \serverusername
    ;[homes]
    ;   comment = Home Directories
    ;   browseable = no
    
    # By default, the home directories are exported read-only. Change the
    # next parameter to 'no' if you want to be able to write to them.
    ;   read only = yes
    
    # File creation mask is set to 0700 for security reasons. If you want to
    # create files with group=rw permissions, set next parameter to 0775.
    ;   create mask = 0700
    
    # Directory creation mask is set to 0700 for security reasons. If you want to
    # create dirs. with group=rw permissions, set next parameter to 0775.
    ;   directory mask = 0700
    
    # By default, \serverusername shares can be connected to by anyone
    # with access to the samba server. Un-comment the following parameter
    # to make sure that only "username" can connect to \serverusername
    # The following parameter makes sure that only "username" can connect
    #
    # This might need tweaking when using external authentication schemes
    ;   valid users = %S
    
    # Un-comment the following and create the netlogon directory for Domain Logons
    # (you need to configure Samba to act as a domain controller too.)
    ;[netlogon]
    ;   comment = Network Logon Service
    ;   path = /home/samba/netlogon
    ;   guest ok = yes
    ;   read only = yes
    
    # Un-comment the following and create the profiles directory to store
    # users profiles (see the "logon path" option above)
    # (you need to configure Samba to act as a domain controller too.)
    # The path below should be writable by all users so that their
    # profile directory may be created the first time they log on
    ;[profiles]
    ;   comment = Users profiles
    ;   path = /home/samba/profiles
    ;   guest ok = no
    ;   browseable = no
    ;   create mask = 0600
    ;   directory mask = 0700
    
    [printers]
       comment = All Printers
       browseable = no
       path = /var/spool/samba
       printable = yes
       guest ok = no
       read only = yes
       create mask = 0700
    
    # Windows clients look for this share name as a source of downloadable
    # printer drivers
    [print$]
       comment = Printer Drivers
       path = /var/lib/samba/printers
       browseable = yes
       read only = yes
       guest ok = no
    # Uncomment to allow remote administration of Windows print drivers.
    # You may need to replace 'lpadmin' with the name of the group your
    # admin users are members of.
    # Please note that you also need to set appropriate Unix permissions
    # to the drivers directory for these users to have write rights in it
    ;   write list = root, @lpadmin
    
    # A sample share for sharing your CD-ROM with others.
    ;[cdrom]
    ;   comment = Samba server's CD-ROM
    ;   read only = yes
    ;   locking = no
    ;   path = /cdrom
    ;   guest ok = yes
    
    # The next two parameters show how to auto-mount a CD-ROM when the
    #	cdrom share is accesed. For this to work /etc/fstab must contain
    #	an entry like this:
    #
    #       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
    #
    # The CD-ROM gets unmounted automatically after the connection to the
    #
    # If you don't want to use auto-mounting/unmounting make sure the CD
    #	is mounted on /cdrom
    #
    ;   preexec = /bin/mount /cdrom
    ;   postexec = /bin/umount /cdrom

    Last edited by kbrand; February 21st, 2012 at 10:03 PM.

    Reason: added code tags since i just leaned how to


  9. Re: Another «‘net usershare’ returned error 255:»

    First of all:
    There are no share defs in your old config, explains why your win pc’s couldn’t see it.

    Second, please put [ code ] and [ / code ] tags (i put spaces in them to prevent vbulletin from rendering them) around files, makes easier reading.

    The config file i gave you is fine, just copy,paste,modify.
    Your old config (as it appears) is just the file you get from apt-get install samba
    So there’s no point in modifying as it would produce the one i gave you before.

    Feel free to ask questions (see 2e line of signature).

    «Everything that has a beginning, has an end.» —an unexpectedly wise wallpaper


  10. Re: Another «‘net usershare’ returned error 255:»

    We are talking about 2 entirely different ways to create a samba share:

    Classic Shares have share definitions in smb.conf.

    Usershares ( aka nautilus-shares ) are created from Nautilus and have share definitions in /var/lib/samba/usershares.

    BTW, I can reproduce this error in seconds:

    ‘net usershare’ returned error 255: net usershare add: cannot convert name «Everyone» to a SID. Invalid parameter.

    by changing one parameter from true to

    encrypt passwords = false

    That is what you had in your old smb.conf


I have an issue when I try to join my domain.

I am able to create the kerberos ticket successfully.

root@debian:~# kinit Administrateur@ASP.DOMAIN
Password for Administrateur@ASP.DOMAIN:
root@debian:~# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: Administrateur@ASP.DOMAIN

Valid starting       Expires              Service principal
26/04/2016 18:20:18  27/04/2016 04:20:18  krbtgt/ASP.DOMAIN@ASP.DOMAIN
        renew until 27/04/2016 18:20:11

and when I try to join the domain :

    root@debian:~# net ads join -k 
Failed to join domain: failed to lookup
    DC info for domain 'ASP.DOMAIN' over rpc: {Device Timeout} The
    specified I/O operation on %hs was not completed before the time-out period expired.

my krb5.conf is:

[libdefaults]
        default_realm = ASP.DOMAIN

# The following krb5.conf variables are only for MIT Kerberos.
        krb4_config = /etc/krb.conf
        krb4_realms = /etc/krb.realms
        kdc_timesync = 1
        ccache_type = 4
        forwardable = true
        proxiable = true

[realms]
        ASP.DOMAIN = {
                kdc = asp.domain
                admin_server = server.domain
                default_domain = DOMAIN
        }

[domain_realm]
        .asp.domain = ASP.DOMAIN
        asp.domain = ASP.DOMAIN

My smb.conf :

[global]
        security = ADS
        realm = ASP.DOMAIN
        password server = server.domain
        workgroup = asp.domain
        winbind separator = /
        idmap uid = 10000-20000
        idmap gid = 10000-20000
        winbind enum users = yes
        winbind enum groups = yes
        template homedir = /home/%D/%U
        template shell = /bin/bash
        client use spnego = yes
        winbind use default domain = yes
        domain master = no
        local master = no
        preferred master = no
        os level = 0

I have no idea: there is no drop on my firewall. The ticket is ok. I’ve tried with 3 Domain Controlers.

PS : Domain is a variable

EDIT : I’ve tried to do it with samba-tool too

root@debian:~# samba-tool domain join ASP.DOMAIN MEMBER -UAdministrateur --real=ASP.DOMAIN
ERROR(runtime): uncaught exception - Connection to SAMR pipe of PDC for ASP.DOMAIN failed: Connection to DC failed: NT_STATUS_IO_TIMEOUT
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 606, in run
    machinepass=machinepass)

EDIT 2 : Join is ok ? But wbinfo -u is not ok

root@debian:~# net ads join -U Administrateur
Enter Administrateur's password:
Using short domain name -- DOMAIN
Joined 'ASP.DOMAIN' to dns domain 'asp.domain'
DNS Update for asp.kapia failed: ERROR_DNS_GSS_ERROR
DNS update failed: NT_STATUS_UNSUCCESSFUL
root@debian:~# net ads testjoin
Join is OK

root@debian:~# wbinfo -u
could not obtain winbind interface details: WBC_ERR_WINBIND_NOT_AVAILABLE
could not obtain winbind domain name!
Error looking up domain users

EDIT 3 :

enter image description here
EDIT 4 :

root@debian:~# service winbind status
● winbind.service - LSB: start Winbind daemon
   Loaded: loaded (/etc/init.d/winbind)
   Active: active (exited) since mer. 2016-04-27 16:16:00 CEST; 55s ago
  Process: 2222 ExecStart=/etc/init.d/winbind start (code=exited, status=0/SUCCESS)

avril 27 16:16:00 debian winbindd[2233]: #5 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_timer_delay+0xcd) [0x7fbc2b11e1cd]
avril 27 16:16:00 debian winbindd[2233]: #6 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x91ca) [0x7fbc2b11f1ca]
avril 27 16:16:00 debian winbindd[2233]: #7 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x78e7) [0x7fbc2b11d8e7]
avril 27 16:16:00 debian winbindd[2233]: #8 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x8d) [0x7fbc2b11a12d]
avril 27 16:16:00 debian winbindd[2233]: #9 /usr/sbin/winbindd(main+0xb7c) [0x7fbc325cbc8c]
avril 27 16:16:00 debian winbindd[2233]: #10 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fbc2a92db45]
avril 27 16:16:00 debian winbindd[2233]: #11 /usr/sbin/winbindd(+0x25318) [0x7fbc325cc318]
avril 27 16:16:00 debian winbindd[2233]: [2016/04/27 16:16:00.971185,  0] ../source3/lib/dumpcore.c:318(dump_core)
avril 27 16:16:00 debian winbindd[2233]: dumping core in /var/log/samba/cores/winbindd
avril 27 16:16:00 debian winbindd[2233]:

First of all, what is Samba error 255? Well, it is the error that we get when in Ubuntu (for example), we try to share a folder and we cannot because it tells us:

The "network share" returned error 255: net usershare: cannot open usershare directory / var / lib / samba / usershares. Error Permission Denied You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.

This happened to me when I tried to create a shared folder on one of my users’ PCs, so that I could comfortably exchange files with a Windows XP virtual machine running on Virtualbox.

In the case of Ubuntu the solution is simple, because I solved everything by executing in the terminal:

sudo chmod 777 /var/lib/samba/usershares

But this may not be the solution for others. For example, in the case of Debian it can be easily solved also by adding our user to the sambashare group.

# addgroup usuario sambashare

They just told me by MP that another possible solution is adding to the file /etc/samba/smb.conf the parameter: users share owner only = False

But let’s say we want something more. In this case we do not want it to ask us for a username and password to access the shared folder. Well, for this, what we do is create a folder in / media:

# mkdir /media/compartir
# chmod -R 777

And then we add to the end of the file /etc/samba/smb.conf:

[documents] comment = Shared documents path = / media / share public = yes writable = yes

And well, in some cases we have to restart Samba:

# /etc/init.d/samba restart

Now, from the virtual machine I just have to put in Windows Explorer:

\192.168.X.Xcompartir

And ready..

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

I want to connect to Windows Active Directory from CentOS 7 with Samba, winbind.
Samba is already running but Winbind is not errored by following error at log.winbindd.

../source3/winbindd/winbindd_util.c:891(init_domain_list)

Could not fetch our SID — did we join?

I try «net -d 10 ads join -S dcserver -U poweruser» then get error log.
what parameter is Invalid? what parameter ddidn’t I write in my config?
I don’t know «dn» written in this log.

kerberos_kinit_password: as poweruser@DMNAME.OURCO.JP using [MEMORY:libnet_join_user_creds] as ccache and config [/var/lib/samba/lock/smb_krb5/krb5.conf.DMNAME]
Starting GENSEC mechanism spnego
Starting GENSEC submechanism gse_krb5
gse_get_client_auth_token: Server principal not found
SPNEGO(gse_krb5) creating NEG_TOKEN_INIT for ldap/dcserver failed (next[(null)]): NT_STATUS_INVALID_PARAMETER
Failed to setup SPNEGO negTokenInit request: NT_STATUS_INVALID_PARAMETER
kinit succeeded but ads_sasl_spnego_gensec_bind(KRB5) failed for ldap/dcserver with user[poweruser] realm[DMNAME.OURCO.JP]: An invalid parameter was passed to a service or function.
ads_sasl_spnego_gensec_bind(KRB5) failed for ldap/dcserver with user[poweruser] realm=[DMNAME.OURCO.JP]: An invalid parameter was passed to a service or function.
libnet_Join:
    libnet_JoinCtx: struct libnet_JoinCtx
        out: struct libnet_JoinCtx
            account_name             : 'MYCENTSV$'
            netbios_domain_name      : 'DMNAME'
            dns_domain_name          : 'dmname.OURCO.JP'
            forest_name              : 'dmname.OURCO.JP'
            dn                       : NULL
            domain_guid              : 4b8db2c2-43fd-4008-be4f-66ad75c21c2d
            domain_sid               : *
                domain_sid               : S-1-5-21-1645522239-789336058-839522115
            modified_config          : 0x00 (0)
            error_string             : 'failed to connect to AD: An invalid parameter was passed to a service or function.'
            domain_is_ad             : 0x01 (1)
            set_encryption_types     : 0x00000000 (0)
            krb5_salt                : NULL
            result                   : WERR_NERR_DEFAULTJOINREQUIRED
Failed to join domain: failed to connect to AD: An invalid parameter was passed to a service or function.
return code = -1
msg_dgm_ref_destructor: refs=(nil)

asked Nov 13, 2018 at 22:14

Daisuke  Hirayama's user avatar

I resolved by myself.
I didn’t know but «dcserver» was alias of «dcserver-1» in Active Directory.
So It works after I replace it «dcserver-1» — net ads join -S dcserver-1 -U poweruser!

I guess maybe «dcserver-1» is specified in ldap config, but because I have no right of Active Directory Administration, so I’m not sure.

Thanks.

answered Nov 14, 2018 at 4:07

Daisuke  Hirayama's user avatar

  • Печать

Страницы: 1 17 18 [19] 20 21 36   Вниз

Тема: HOWTO: Active Directory Member Workstation- (Версия Исаева Романа А.)  (Прочитано 192437 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
jaap

Сделал второй раз всё по документации от Исаева Романа, но ничего так и заработало

utils/net_ads.c:ads_startup_int(286)
  ads_connect: No logon servers

У кого такая проблемма была как решили?

Такая же проблема в 8.04, 7.10 все по маслу прошло. Как лечил?

У кого какие мысли будут, делаю все 1 в 1 как и на 7.10, на 8.04 машина в домен ни как ни входит.
сет. настр. и руками прописываю и по дхцп результат один. Где копать?


Оффлайн
taksa

не получается пингануть по fqdn , здесь вменяемого описания проблемы не нашел ?
настройки сетки идут через dhcp контролера , куда рыть ?
 


Оффлайн
jaap

не получается пингануть по fqdn , здесь вменяемого описания проблемы не нашел ?
настройки сетки идут через dhcp контролера , куда рыть ?

днс не разрешает запросы от не доменных машин
Я в хосте прописал КД.


Оффлайн
mazzo

2chain
common-account

account   sufficient   pam_winbind.so
account   required    pam_unix.so

common-auth

auth   required   pam_mount.so
auth   optional    pam_group.so
auth   sufficient   pam_unix.so nullok_secure use_first_pass
auth   sufficient   pam_winbind.so use_first_pass krb5_auth krb5_ccache_type=FILE debug
auth   required    pam_deny.so

common-password

password   sufficient   pam_unix.so nullok obscure md5
password   sufficient   pam_winbind.so

common-session

session   required   pam_winbind.so
session   required   pam_unix.so
session   required   pam_mkhomedir.so umask=0022 skel=/etc/skel
session   optional    pam_foreground.so

common-pammount

auth  optional   pam_mount.so use_first_pass
session   optional   pam_mount.so use_first_pass

nsswitch.conf

passwd :   compat winbind
group :     compat winbind
shadow:    compat
hosts :      files dns
networks :files dns
protocols : db files
services :   db files
ethers :     db files
rpc :         db files
netgroup : files winbind


Оффлайн
mazzo

какой то факинг щщит твориться….по команде /etc/networks/if-up.d/ntpdate время переводиться ровно на 8 часов назад…..и еще теперь раскладка русская слетела
при попытке залогиниться ваще никаких ругательств…..просто сбрасываются поля…
полез в логи, вот такие записи
/var/log/samba/log.wb_DOMAIN

[2008/05/13 03:15:33, 1] libads/ldap_utils.c:ads_do_search_retry_internal (87)
ads_search_retry:failed to reconnect (No logon servers)

чё то ваще много ругани в логах….как запостить сюда их только….((


Оффлайн
mazzo

что значит запись в логах (/var/log/samba/log.winbindd) :

 [2008/05/13 06:58:08, 1] nsswitch/winbindd_group.c:winbindd_getgrnam(519)
group 0 in domain FLUX does not exist

?


Оффлайн
mazzo

у меня тут как записки сумашедшего уже получаются))))
на dc нашел такие ошибки :
Не удалось выполнить проверку подлинности для сеанса компьютера FLUX.Произошла следующас ошибка : Отказано в доступе. Источник NETLOGON, код ошибки — 5805.
Не удалось установить сеанс с компьютера «FLUX»,так как указанная им доверительная учетная запись «FLUX$» отсутствует в базе данных.код — 5723.


Оффлайн
zhenyok

pam_mount — это посмотреть
а дважды — я неправильно написал, не создается, а в условиях проверяется
в common_session и в gdm
попробуй закоментировать строчки во всех  пам модулях, с пам маунт, чтобы не было проверки

Закоментил я проверку в обоих файлах, но это не помогло :(
Поставил с нуля 8.04, таже самая ошибка… Логи 8.04:
.xsession-errors:

gdm[5747]: DEBUG: Attempting to parse key string: daemon/Greeter=/usr/lib/gdm/gdmlogin
gdm[5747]: DEBUG: Attempting to parse key string: daemon/PreSessionScriptDir=/etc/gdm/PreSession/
gdm[5747]: DEBUG: Forking extra process: /etc/gdm/PreSession/Default
gdm[5748]: DEBUG: Attempting to parse key string: xdmcp/Enable=false
gdm[5748]: DEBUG: Attempting to parse key string: daemon/ServAuthDir=/var/lib/gdm
gdm[5748]: DEBUG: Attempting to parse key string: daemon/RootPath=/sbin:/usr/sbin:/bin:/usr/bin
gdm[5747]: DEBUG: Attempting to parse key string: daemon/DefaultPath=/bin:/usr/bin
gdm[5747]: DEBUG: Attempting to parse key string: daemon/BaseXsession=/etc/gdm/Xsession
gdm[5747]: DEBUG: Running /etc/gdm/Xsession default for ivanov_ii on :0
/etc/gdm/Xsession: Beginning session setup...
Setting IM through im-switch for locale=ru_RU.
Start IM through /etc/X11/xinit/xinput.d/all_ALL linked to /etc/X11/xinit/xinput.d/default.

(seahorse-agent:5747): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (10000)

(process:5747): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (10000)

(gconf-sanity-check-2:5867): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (10000)
SESSION_MANAGER=local/qq:/tmp/.ICE-unix/5747

(gnome-keyring-daemon:5868): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (10000)
** Message: another SSH agent is running at: /tmp/ssh-mBZISb5747/agent.5747
Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

Failed to start message bus: Memory allocation failure in message bus
dbus-daemon exited unexpectedly
**
** ERROR:(gsm-dbus.c:118):gsm_dbus_daemon_start: assertion failed: (dbus_daemon_pid != 0)

auth.log

May 14 14:21:15 qq gdm[5444]: pam_unix(gdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=  user=ivanov_ii
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): [pamh: 0x080cece0] ENTER: pam_sm_authenticate (flags: 0x0000)
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): getting password (0x00000191)
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): pam_get_item returned a password
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): Verify user 'ivanov_ii'
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): PAM config: krb5_ccache_type 'FILE'
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): enabling krb5 login flag
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): enabling request for a FILE krb5 ccache
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): user 'ivanov_ii' granted access
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): request returned KRB5CCNAME: FILE:/tmp/krb5cc_10000
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): Returned user was 'ivanov_ii'
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:auth): [pamh: 0x080cece0] LEAVE: pam_sm_authenticate returning 0
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:account): user 'ivanov_ii' OK
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:account): user 'ivanov_ii' granted access
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:setcred): [pamh: 0x080cece0] ENTER: pam_sm_setcred (flags: 0x0002)
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:setcred): PAM_ESTABLISH_CRED not implemented
May 14 14:21:15 qq gdm[5444]: pam_winbind(gdm:setcred): [pamh: 0x080cece0] LEAVE: pam_sm_setcred returning 0
May 14 14:21:15 qq gdm[5444]: pam_unix(gdm:session): session opened for user ivanov_ii by (uid=0)
May 14 14:21:22 qq gdm[5444]: pam_unix(gdm:session): session closed for user ivanov_ii
May 14 14:21:22 qq gdm[5444]: pam_winbind(gdm:setcred): [pamh: 0x080cece0] ENTER: pam_sm_setcred (flags: 0x0004)
May 14 14:21:22 qq gdm[5444]: pam_winbind(gdm:setcred): [pamh: 0x080cece0] ENTER: pam_sm_close_session (flags: 0x0004)
May 14 14:21:22 qq gdm[5444]: pam_winbind(gdm:setcred): username [ivanov_ii] obtained
May 14 14:21:22 qq gdm[5444]: pam_winbind(gdm:setcred): user 'ivanov_ii' OK
May 14 14:21:22 qq gdm[5444]: pam_winbind(gdm:setcred): [pamh: 0x080cece0] LEAVE: pam_sm_close_session returning 0
May 14 14:21:22 qq gdm[5444]: pam_winbind(gdm:setcred): [pamh: 0x080cece0] LEAVE: pam_sm_setcred returning 0
May 14 14:21:34 qq gdm[5444]: pam_winbind(gdm:account): request failed
May 14 14:21:34 qq gdm[5444]: pam_unix(gdm:session): session opened for user root by (uid=0)
May 14 14:21:47 qq gnome-keyring-daemon[6062]: adding removable location: volume_uuid_C897_FD11 at /media/KINGSTON
syslog


Оффлайн
@rtem

возникла проблема при добавлении машины в домен, все просмотрел не пойму в чем дело

[2008/05/16 10:33:50, 0] libsmb/cliconnect.c:cli_session_setup_spnego(785)
  Kinit failed: Configuration file does not specify default realm
Failed to join domain!

ArchLinux !
Pentium 4 3.0 Ghz/Asus P5GZ-MX/2 Gb DDR2/Hitachi 80 Gb


Оффлайн
mazzo

у меня такое было на 7.04 и на дебиане 4….


Оффлайн
@rtem

именно на 7.04 и делаю , а как решил проблему???

ArchLinux !
Pentium 4 3.0 Ghz/Asus P5GZ-MX/2 Gb DDR2/Hitachi 80 Gb


Оффлайн
mazzo

пока никак……я все по русски делаю — написано что для ubuntu 7.10,я беру Fluxbuntu 7.10,Debian 4 , Ubuntu 7.04…..не зря же написано что этот фак для версии 7.10,вот уже образу прожигаю……где то же было что для 7.04 есть отличия…


Оффлайн
slech

никто не подскажет почему не могу шары создавать ?
т.е. до ввода в домен всё работало на ура, а сейчас из gui никак:
‘net usershare’ returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied
You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.

« Последнее редактирование: 19 Мая 2008, 11:14:43 от slech »


Оффлайн
Maxim-va

Поставил 8.04 с нуля. Все делал по описанию, обладаю правами администратора домена. Дошел до регистрации машины в домене — никак:

root@zulu:~# net ads join –U maxim
[2008/05/22 09:43:10, 0] utils/net_ads.c:ads_startup_int(286)
  ads_connect: No logon servers
Failed to join domain: No logon servers
перечитал всю ветку, сделал файл /etc/network/if-up.d/winbr, но не понял он сам будет запускаться или его еще где то надо прописать ?
мой relolv.conf:

domain domain4.XXXX.ru
search domain4.XXXX.ru
nameserver 192.168.0.2
nameserver 192.168.0.6
0.2 это контроллер домена с ДНС, 0.6 это шлюз в интернет.
мой smb.conf:

[global]
unix charset = UTF-8
dos charset = CP866
display charset = UTF-8
workgroup = DOMAIN4
server string = %h server (Samba, Ubuntu)
; У кого есть wins можете включить   wins support = no
; и прописать wins сервер
; wins server = 192.168…

   dns proxy = no
      log file = /var/log/samba/log.%m
         max log size = 1000
    syslog = 0
       panic action = /usr/share/samba/panic-action %d
       # вот тут мы показываем, что используем AD
          security = ads
 
  # если стоит * то samba сама будет искать домен контроллер через dc, или же можно перечислить их IP адреса через пробел в явном виде. Или указать один #IP для того dc на котором хотите авторизоваться. Для отказоустойчивости лучше указать несколько dc или *
     password server = 192.168.0.2
     
     
        realm = DOMAIN4.XXXX.RU  #Внимание realm пишется большими буквами !!!
   encrypt passwords = true
      passdb backend = tdbsam
         obey pam restrictions = yes
    invalid users = root
       passwd program = /usr/bin/passwd %u
       passwd chat = *EntersnewsUNIXspassword:* %nn *RetypesnewsUNIXspassword                                                                              :* %nn *passwd:*passwordsupdatedssuccessfully* .
       
       
          socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
     idmap uid = 10000-20000
        idmap gid = 10000-20000
   template shell = /bin/bash
      winbind enum groups = yes
         winbind enum users = yes
#домашняя папку у пользователя будет в папке с именем домена. Лучше ее создать заранее вручную.
    template homedir = /home/%D/%U
       client use spnego = yes
          winbind use default domain = yes
     winbind refresh tickets = yes
        restrict anonymous = 2
# строки ниже, чтобы рабочая станция не пыталась стать обозревателем в сети.
domain master = no
local master = no
preferred master = no
os level = 0


причем что странно … один раз получилось получить запрос на пароль пользователя домена, правда так и не понял как, но все равно получал тот же отет.
Может подскажете чего ?


Оффлайн
zhenyok

Поставил 8.04 с нуля. Все делал по описанию, обладаю правами администратора домена. Дошел до регистрации машины в домене — никак:
root@zulu:~# net ads join –U maxim
[2008/05/22 09:43:10, 0] utils/net_ads.c:ads_startup_int(286)
  ads_connect: No logon servers
Failed to join domain: No logon servers

«net ads join –U» ты эту команду из howto, в окно терминала копировал? здесь не –U (тиреU) а -U (минусU)
Кстати давно уже надо howto поправить, много там уже косяков.

перечитал всю ветку, сделал файл /etc/network/if-up.d/winbr, но не понял он сам будет запускаться или его еще где то надо прописать ?

там же написано

И присваиваем ему права запуска.
chmod  +x /etc/network/if-up.d/winbr

« Последнее редактирование: 22 Мая 2008, 14:37:57 от zhenyok »


  • Печать

Страницы: 1 17 18 [19] 20 21 36   Вверх

Hey folks, I’ve been struggling with Samba and folder sharing for the last 2 days and I’m at a loss and hoping that somebody more knowledgeable can help.

I’ve had Samba running well on a Linux Mint 20 Cinnamon edition machine for many months without issue. I recently installed Linux Mint Cinnamon on 2 other machines and having been trying to get Samba working on them but keep getting this error when trying to share any folder:

net usershare returned error 255: net usershare add:
cannot convert name «mark» to a SID. None of the
information to be translated has been translated..

I have uninstalled and reinstalled Samba and the Samba Client several times, and tried various options in the smb.conf file but nothing seems to work. I then checked the machine that Samaba has been running on and while previous shared folders are still shared, I get the same error if I try to share any new folders.

If anybody can help me solve the issue before I end up pulling my hair out I would greatly appreciate it.

Here are the results for testparm -s

mark@Home-Linux:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
log file = /var/log/samba/log.%m
logging = file
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
passwd program = /usr/bin/passwd %u
server role = standalone server
server string = %h server (Samba, Ubuntu)
unix password sync = Yes
usershare allow guests = Yes
usershare owner only = No
workgroup = MARK
idmap config * : backend = tdb

[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Понравилась статья? Поделить с друзьями:
  • Error need typename before because is a dependent scope
  • Error need to or from clause
  • Error need a single repository as argument
  • Error nck must be a 8 digit number yota
  • Error nc program does not contain any operations