Trouble with Samba Domain

Posted by Arkevius on Ask Ubuntu See other posts from Ask Ubuntu or by Arkevius
Published on 2012-11-22T04:56:53Z Indexed on 2012/11/22 5:12 UTC
Read the original article Hit count: 273

Filed under:
|
|

I'm having a bit of trouble setting up this Samba domain correctly. I'm getting an Access Denied error when trying to add a Windows XP machine to the domain. I'll go through my scenario in detail, but for those of you wanting a TLDR summary it'll be at the bottom of this post.

I have HP Proliant server with Ubuntu 12.04 LTS installed. For this particular environment, I need this server to act as a PDC, file server, and print server. I began by updating and upgrading the packages (of course). Then went to install samba, gnome-desktop, wine, and cpanm. Samba was, of course, for the PDC and file/print services. The GUI was needed because a certain software has to be installed on there that needs a GUI. Wine was needed because the software is Windows-native. And cpanm was for a perl script I have running.

For Samba, I went into the smb.conf file and enabled domain logons, changed the workgroup/domain name, the logon script for a per-group basis (netlogon/%g), enabled the netlogon and profiles share, and setup a couple of custom shares for the file service. The printer was added later, and seems to be working just fine. I then restarted the services, and used the net groupmap command to ensure my unix groups were mapped correctly to the Windows groups. After this, I went to a Windows box, and was able to successfully join the domain without a problem. After some fidgeting with the software to get it running on the win boxes from the server (it's a records management system program, which stores it's database files on the server), I went to add another computer to the domain. But now it's saying Access Denied.

Before when I had this trouble it was because I forgot to add the group "machines" so Samba could create machine accounts. Thinking this was the case, I manually created the machine account to test this theory. However, it would still give me an Access Denied error. That must mean it has something to do with permissions now, correct?

I've been fighting with this server for the past two weeks. If it's not one thing that;s wrong, then it's something else completely different. This would be the third time I've actually reinstalled everything to start over.

I'll post snippets of my system settings below. If anything else is needed, just say the word and I'll gather up the info.

The unix group 'domadmin' is the Domain Admins group.

Samba Administrator account

administrator:x:1000:1000:Administrator,,,:/home/administrator:/bin/bash

Adminstrator's groups

administrator adm cdrom sudo dip plugdev lpadmin sambashare domadmin crimestar

Samba's Configuration FIle (a snippet anyways)

[global]
  workgroup = CITYPD
  server string = BPDServer
  dns proxy = no
  log file = /var/log/samba/log.%m
  max log size = 1000
  syslog = 0
  panic action = /usr/share/samba/panic-action %d
  security = user
  encrypt passwords = true
  passdb backend = tdbsam
  obey pam restrictions = yes
  unix password sync = yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  pam password change = yes
  map to guest = bad user
  domain logons = yes
  logon path = \\%L\srv\samba\profiles\%U
  logon script = logon.bat
  add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  domain master = yes
  usershare allow guests = yes
[netlogon]
  comment = Network Logon Service
  path = /srv/samba/netlogon/%g
  guest ok = yes
  read only = yes
  browseable = no
[profiles]
  comment = All Printers
  browseable = no
  path = /var/spool/samba
  printable = yes
  guest ok = no
  read only = yes
  create mask = 0700
[print$]
  comment = Printer Drivers
  path = /var/lib/samba/printers
  browseable = yes
  read only = yes
  guest ok = no
  write list = root, @lpadmin
[crimestar]
  comment = "Crimestar DB"
  path = /srv/crimestar/db
  valid users = @domadmin, @crimestar
  admin users = administrator
  writeable = yes
  guest ok = no
  browseable = no
  create mask = 0666
  directory mask = 0777
[crimestarfiles]
  path = /home/administrator/.wine/drive_c/crimestar
  admin users = administrator
  browseable = yes

ls -la on /srv/samba/profiles

drwxrwxrwx 2 root machines 4096 Nov 21 15:27 .
drwxr-xr-x 4 root root     4096 Nov 21 15:28 ..

ls -la on /srv/samba/netlogon

drwxr-xr-x 6 root root 4096 Nov 21 15:30 .
drwxr-xr-x 4 root root 4096 Nov 21 15:28 ..
drwxr-xr-x 2 root root 4096 Nov 21 15:30 crimestar
drwxr-xr-x 2 root root 4096 Nov 21 18:13 domadmin
drwxr-xr-x 3 root root 4096 Nov 21 15:30 guests
drwxr-xr-x 2 root root 4096 Nov 21 15:29 users

GrouMap list

Domain Users (S-1-5-21-2978508755-2341913247-928297747-513) -> users
Domain Admins (S-1-5-21-2978508755-2341913247-928297747-512) -> domadmin
Domain Guests (S-1-5-21-2978508755-2341913247-928297747-514) -> nogroup

TLDR

I'm getting an Access Denied error message while trying to join a windows box to a samba domain, even after I successfully joined another computer without a problem. System settings / files are quoted above.

Anyone have any ideas or suggestions?

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about samba

  • Unable to connect to Samba printer

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I have a headless Ubuntu 12.04 server for files and printers. It shares files via Samba just fine. However, the HP PSC-750xi connected to the server via USB is not accessible from my Ubuntu 12.04 laptop. I can browse for it in the Printing control panel, but any attempt to authenticate my ID to the… >>> More

  • Samba folder is gone

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I seem to have some issues sharing folders from my Ubuntu 12.04 machine to a Win7 machine. After playing around with the settings, I decided to revert to Samba's original setting by reinstalling it: sudo apt-get purge samba sudo rm -rf /etc/samba/ /etc/default/samba sudo apt-get install samba just… >>> More

  • Samba on OS X 10.6.4

    as seen on Server Fault - Search for 'Server Fault'
    I just updated from 10.6.3 to 10.6.4, and now my Samba shares won't mount and won't allow access into the directories. In the logs, I've started to get the following errors, any idea what might have gone wrong? 2010/06/25 15:54:27, 0, pid=13848] /SourceCache/samba/samba-235.4/samba/source/passdb/secrets… >>> More

  • OpenLDAP and Samba, can't log onto Samba share from Windows

    as seen on Server Fault - Search for 'Server Fault'
    The former jackass IT-guy that I'm taking over for had a Samba share setup on a Fedora server that uses our OpenLDAP server to authenticate users who want to log in from Windows. We recently added a new employee and I jumped through the LDAP hoops to add them to the system. However, I can't seem… >>> More

  • Windows 7 Samba issue

    as seen on Server Fault - Search for 'Server Fault'
    We have a strange samba issue affecting only one user. Our samba setup is as follow : Red Hat Enterprise Linux Server release 5.4 (Tikanga) - Samba Server Samba version 3.0.33-3.14.el5 - Samba version Domain Controller WIN2008R2 Standard -… >>> More