Find the answer to your Linux question:
Results 1 to 4 of 4
Good people at Linuxforums, A while ago I posted a question about Samba as a PDC, somebody gave me a tip and I thought the problem was solved. At some ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    18

    Samba PDC NT_STATUS_CONNECTION_REFUSED


    Good people at Linuxforums,

    A while ago I posted a question about Samba as a PDC, somebody gave me a tip and I thought the problem was solved.
    At some point I was welcomed to the domain VITRONIX, sadly only once.
    Then I thought to install an earlier version of Samba, the version that the Using Samba book covers.
    I was adviced not to do so, stubbern as I am, I tried it but ran into problems regarding th C compiler.
    So I'm back where I was two weeks ago
    I'm running Ubuntu 10.04, Samba version 3.4.7.
    I replaced all the at sings by a #. (I use ssh to log on to the server)
    This is the output that matters:

    root#ubuntu:/etc/samba# groupadd samba_domain_admins
    root#ubuntu:/etc/samba# groupadd samba_domain_users
    root#ubuntu:/etc/samba# groupadd samba_domain_guests
    root#ubuntu:/etc/samba# net getlocalsid VITRONIX
    SID for domain VSERVER is: S-1-5-21-3949740071-3132796615-663331988
    root#ubuntu:/etc/samba# net groupmap add sid=S-1-5-21-3949740071-3132796615-663331988-512 ntgroup="Domain Admins" unixgroup=samba_domain_admins
    Successfully added group Domain Admins to the mapping db as a domain group
    root#ubuntu:~# smbpasswd -a sysop
    New SMB password:
    Retype new SMB password:
    Added user sysop.
    root#ubuntu:~# net rpc rights grant 'VITRONIX\Domain Admins' SeMachineAccountPrivilege -S vserver -U sysop
    Enter sysop's password:
    Could not connect to server vserver
    Connection failed: NT_STATUS_CONNECTION_REFUSED
    root#ubuntu:~# cat smb.conf
    [global]
    workgroup = VITRONIX
    netbios name = VSERVER
    comment = Vitronix Virtual Server
    domain logons = Yes
    os level = 65
    preferred master = Yes
    domain master = Yes
    enable privileges = Yes

    #Authentication
    encrypt passwords = True
    passdb backend = tdbsam
    security = user

    [netlogon]
    comment = Netlogon Service
    path = /home/samba/netlogon
    read only = Yes
    write list = #samba_domain_admins

    [profiles]
    admin users = #samba_domain_admins
    browseable = No
    comment = User profiles
    create mask = 0600
    directory mask = 0700
    guest ok = Yes
    path = /home/samba/profiles
    profile acls = Yes
    read only = No
    writeable = Yes
    valid users = %U
    root#ubuntu:~# testparm
    Load smb config files from /etc/samba/smb.conf
    rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
    Processing section "[netlogon]"
    Processing section "[profiles]"
    Loaded services file OK.
    Server role: ROLE_DOMAIN_PDC
    Press enter to see a dump of your service definitions

    [global]
    workgroup = VITRONIX
    netbios name = VSERVER
    domain logons = Yes
    os level = 65
    preferred master = Yes
    domain master = Yes
    comment = Vitronix Virtual Server

    [netlogon]
    comment = Netlogon Service
    path = /home/samba/netlogon
    write list = #samba_domain_admins

    [profiles]
    comment = User profiles
    path = /home/samba/profiles
    valid users = %U
    admin users = #samba_domain_admins
    read only = No
    create mask = 0600
    directory mask = 0700
    guest ok = Yes
    profile acls = Yes
    browseable = No
    browsable = No
    root#ubuntu:~# net rpc rights grant 'VITRONIX\Domain Admins' SeMachineAccountPrivilege -S VSERVER -U sysop
    Enter sysop's password:
    Could not connect to server VSERVER
    Connection failed: NT_STATUS_CONNECTION_REFUSED
    root#ubuntu:~# smbpasswd -e sysop
    Enabled user sysop.
    root#ubuntu:~# net rpc rights grant 'VITRONIX\Domain Admins' SeMachineAccountPrivilege -S VSERVER -U sysop
    Enter sysop's password:
    Could not connect to server VSERVER
    Connection failed: NT_STATUS_CONNECTION_REFUSED
    root#ubuntu:~# net rpc rights grant 'VITRONIX\Domain Admins' SeMachineAccountPrivilege -S vserver -U sysop
    Enter sysop's password:
    Could not connect to server vserver
    Connection failed: NT_STATUS_CONNECTION_REFUSED

    Hope anybody can give me a clue,

    Thanks in advance,

    Jan Visser

  2. #2
    Just Joined! PsychoJock's Avatar
    Join Date
    May 2008
    Location
    Ashford, kent
    Posts
    23
    Hi Vitronix, I;m not an expert but I'm not a total newbie either. SAMBA is great when it's working but it can get real picky sometimes. What do you get if you use /usr/bin/smbclient -L host, where "host" is the name of your Server?
    This should give you Server and share information about your server. You will be able to see if it is running as the controller for it's domain.

  3. #3
    Just Joined!
    Join Date
    Jul 2012
    Posts
    18
    Quote Originally Posted by PsychoJock View Post
    Hi Vitronix, I;m not an expert but I'm not a total newbie either. SAMBA is great when it's working but it can get real picky sometimes. What do you get if you use /usr/bin/smbclient -L host, where "host" is the name of your Server?
    This should give you Server and share information about your server. You will be able to see if it is running as the controller for it's domain.
    Hello PsychoJock,

    The output I get is:
    Connection to VSERVER failed (Error NT_STATUS_BAD_NETWORK_NAME)

    I'm not willing to give up and going to buy the Official Samba 3 Howto book.

    Thanks anyway.

  4. #4
    Just Joined!
    Join Date
    Jul 2012
    Posts
    18

    Red face

    Quote Originally Posted by PsychoJock View Post
    Hi Vitronix, I;m not an expert but I'm not a total newbie either. SAMBA is great when it's working but it can get real picky sometimes. What do you get if you use /usr/bin/smbclient -L host, where "host" is the name of your Server?
    This should give you Server and share information about your server. You will be able to see if it is running as the controller for it's domain.
    I finally did it

    here's how

    root@ubuntu:/etc/samba# cat smb.conf
    [global]
    workgroup = VITRONIX
    netbios name = VSERVER
    domain logons = yes
    os level = 65
    preferred master = yes
    domain master = yes
    enable privileges = yes
    security = user
    encrypt passwords = yes
    passdb backend = smbpasswd

    [netlogon]
    comment = Net Logon Service
    path = /home/samba/netlogon
    write list = +samba_domain_admins

    [shared]
    comment = Test Share
    path = /var/shared
    read only = no
    root@ubuntu:/etc/samba# nmblookup 'VITRONIX#1b' 'VITRONIX#1c'
    querying VITRONIX on 192.168.10.255
    192.168.10.50 VITRONIX<1b>
    querying VITRONIX on 192.168.10.255
    192.168.10.50 VITRONIX<1c>
    root@ubuntu:/etc/samba# groupadd samba_domain_admins
    root@ubuntu:/etc/samba# groupadd samba_domain_users
    root@ubuntu:/etc/samba# groupadd samba_domain_guests
    root@ubuntu:/etc/samba# net getlocalsid VITRONIX
    SID for domain VITRONIX is: S-1-5-21-4014343366-2583846740-916318862
    root@ubuntu:/etc/samba# net groupmap add sid=S-1-5-21-4014343366-2583846740-916318862-512 ntgroup="Domain Admins" unixgroup=samba_domain_admins
    Successfully added group Domain Admins to the mapping db as a domain group
    root@ubuntu:/etc/samba# testparm
    Load smb config files from /etc/samba/smb.conf
    rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
    Processing section "[netlogon]"
    Processing section "[shared]"
    Loaded services file OK.
    Server role: ROLE_DOMAIN_PDC
    Press enter to see a dump of your service definitions

    [global]
    workgroup = VITRONIX
    netbios name = VSERVER
    passdb backend = smbpasswd
    domain logons = Yes
    os level = 65
    preferred master = Yes
    domain master = Yes

    [netlogon]
    comment = Net Logon Service
    path = /home/samba/netlogon
    write list = +samba_domain_admins

    [shared]
    comment = Test Share
    path = /var/shared
    read only = No

    root@ubuntu:/etc/samba# useradd admin -g samba_domain_admins
    root@ubuntu:/etc/samba# smbpasswd -a admin
    New SMB password:
    Retype new SMB password:
    Added user admin.
    root@ubuntu:/etc/samba# net rpc rights grant 'VITRONIX\Domain Admins' SeMachineAccountPrivilege -S VSERVER -U admin
    Enter admin's password:
    Successfully granted rights.
    root@ubuntu:/etc/samba# groupadd machines
    root@ubuntu:/etc/samba# useradd -d /dev/null -g machines -s /bin/false -M virtualxp$

    where virtualxp is the netbios name of the client, I looged in using the admin account.
    Now Windows can't find the profiles share, I'll let you know when and how I fixed that.

    Anyway Thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •