[Samba] PDC error; can not open passdb database

John H Terpstra
2003-06-09T21:11:31Z

On Mon, 9 Jun 2003, Karl Banasky wrote:

> I did not use the "-a" on originally.  I used it and same thing,
access denied.  I have increased the log to 2 and here is the complete
transaction.
>
> [2003/06/09 13:38:24, 2] smbd/server.c:exit_server(511)
>   Closing connections
> [2003/06/09 13:38:25, 2] rpc_server/srv_samr_nt.c:_samr_lookup_domain(2050)
>   Returning domain sid for domain HCSTEST ->
S-1-5-21-4123070808-3853918392-2400374137
> [2003/06/09 13:38:25, 2] rpc_parse/parse_samr.c:samr_io_userinfo_ctr(6285)
>   samr_io_userinfo_ctr: unknown switch level 0x1a
> [2003/06/09 13:38:25, 0] rpc_server/srv_samr.c:api_samr_set_userinfo(670)
>   api_samr_set_userinfo: Unable to unmarshall SAMR_Q_SET_USERINFO.
> [2003/06/09 13:38:25, 2] passdb/pdb_smbpasswd.c:startsmbfilepwent(170)
>   startsmbfilepwent_internal: unable to open file /etc/samba.d/smbpasswd.
Error was Permission denied
> [2003/06/09 13:38:25, 0] passdb/pdb_smbpasswd.c:pdb_getsampwrid(1418)
>   unable to open passdb database.
> [2003/06/09 13:38:25, 2] smbd/server.c:exit_server(511)
>   Closing connections
> ~
>
> I am using SAMBA 2.2.8a.  I will attach my smb.conf file at the end of
> this email.  I have done the signorseal patch too with a reboot with no
> results. Any further thoughts?  Thanks.

Have you checked:

1) That you have a file /etc/samba.d/smbpasswd?

2) What are the permissions on it?
	- should be -rwxr----

3) What are the permissions on /etc/samba.d (directory)?
	- should be -rwxrwxr-x

The error messaage says that smbpasswd was denied access to the file
/etc/samba.d/smbpasswd. That is an issue of file system permissions, not a
samba problem.

Were you trying to access this as root or as some other user. Only root
has the ability to modify this file.

- John T.

>
> Karl-
>
>
>  >>  Karl,
>
>  >>  What version of samba are you running?
>
>  >>  Did you do (for each user)?
>
>  >>      smbpasswd -a 'username'
>
>  >>  - John T.
>
>
>  >>  On Mon, 9 Jun 2003, Karl Banasky wrote:
>
>  >>  > I am looking to setup a domain server.  I have tried and
tried and this
>  >>  is the closest I have gotten so far.
>  >>  > The main problem I have is in the user authentication. I am
getting an
>  >>  error that the user or password is wrong. Currently it looks
like Samba
>  >>  can not access the passwd file.  What is this file?
>  >>  >
>  >>  > My log for the client give this error:
>  >>  >
>  >>  >     [2003/06/05 15:35:35, 0]
>  >>  rpc_server/srv_samr.c:api_samr_set_userinfo(670)
>  >>  >      api_samr_set_userinfo: Unable to unmarshall
SAMR_Q_SET_USERINFO.
>  >>  >     [2003/06/05 15:35:35, 0]
>  >>  passdb/pdb_smbpasswd.c:pdb_getsampwrid(1418)
>  >>  >      unable to open passdb database.
>  >>  >
>  >>  > I am running Caldera 3.1.1
>  >>  > I compiled samba with the "makerpms" for Caldera
(I pray this will
>  >>  always work; as for the "build with" I have no Idea)
>  >>  >
>  >>  > Any Ideas?  If there is any info you need please let me
know.
>  >>  > And SAMBA rock!
>  >>  > Thanks.
>  >>  >
>  >>  > Karl Banasky
>  >>  > Email kbanasky@heatcon.com
>  >>  >
>  >>  > --
>  >>  > To unsubscribe from this list go to the following URL and
read the
>  >>  > instructions:
http://lists.samba.org/mailman/listinfo/samba
>  >>  >
>
>  >>  --
>  >>  John H Terpstra
>  >>  Email: jht@samba.org
>
>
> smb.conf:
>
> [global]
>         netbios name = HCTEST
>         workgroup = HCSTEST
>         server string = Test Samba Server
>         #hosts allow = 192.168.200. 127.
>         passdb backend = smbpasswd
>         encrypt passwords = Yes
>         obey pam restrictions = no
>         password level = 8
>         username level = 8
>         security = user
>         #lock directory = /share/test/lock
>         log file = /var/log/samba.d/smb.%m
>         max log size = 200
>         log level = 2
>         level2 oplocks = No
>         socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
>         logon path = \\%L\Profiles\%U
>         logon home = \\%L\Profiles\%U
>         logon script = logon.bat
>         dns proxy = No
>         name resolve order = wins lmhosts bcast
>         domain master = yes
>         domain logons = yes
>         domain admin group = @admins
>         #wins support = yes
>         wins server = 192.168.200.2
>         printer admin = karl
>         printing = cups
>         printcap name = lpstat
>         load printers = yes
>         os level = 70
>         oplocks = No
>         level2 oplocks = No
>         dos filetimes = Yes
>         dos filetime resolution = Yes
>         #map to guest = Bad user
>
>         #add user script = /usr/sbin/useradd -s /bin/false %u &&
/usr/bin/smbpasswd -a %u
>         #add user script = /usr/sbin/useradd -d /dev/null  -g machines -s
/bin/false -M %u && /usr/bin/smbpasswd -m -a %u
>         #unix password sync = yes
>         #passwd program = /usr/bin/passwd %u
>         #passwd chat = \
>         #*password* %n\n \
>         #*password* %n\n \
>         #*successful*
>
> [MyHome]
>         comment = Home Directories
>         path = %H/Samba
>         username = %S
>         valid users = %S
>         read only = No
>         directory mode = 0700
>         create mode = 0600
>         only user = Yes
>         dos filetimes = yes
>
> [sharedir]
>         comment = Public Stuff
>         path = /share/public
>         force group = users
>         read only = No
>         force create mode = 0770
>         force directory mode = 0770
>         level2 oplocks = no
>         dos filetimes = yes
>
> [CD-ROM]
>         path = /mnt/cdrom
>         read only = yes
>         browseable = yes
>         root preexec = mount /mnt/cdrom
>         root postexec = umount /mnt/cdrom
>
> [print$]
>         comment = Printer Drivers
>         path = /etc/samba.d/drivers
>         guest ok = no
>         write list = karl
>         writable = no
>         browsable = yes
>
> [netlogon]
>         comment = Samba Network Logon Service
>         path = /srv/samba/netlogon
>         write list = @admin
>         guest ok = Yes
>
> [profiles]
>         path = /srv/samba/profiles
>         read only = No
>         guest ok = Yes
>         browseable = No
>
> [printers]
>         comment = All Printers
>         path = /var/spool/samba
>         guest ok = yes
>         browseable = no
>         public = yes
>         writable = no
>         printable = yes
>         printer admin = karl
>

--
John H Terpstra
Email: jht@samba.org