Error 0 on smbpasswd command (1.9.19-prealpha)
Gerald Carter
cartegw at Eng.Auburn.EDU
Thu Apr 23 19:42:54 GMT 1998
Andrew Perrin - Demography wrote:
>
> Now, however, I am unable to use smbpasswd (the program) if there is
> already an smbpasswd (the file) in place; witness:
>
> #@boserup:/usr/LOCAL/samba/private>ls -la
> total 6
> drwxrwxrwx 2 root other 512 Apr 21 16:04 .
> drwxr-xr-- 7 root other 512 Apr 21 15:01 ..
> -rw------- 1 root other 0 Apr 21 16:04 smbpasswd
>
First thing is to change the permission on /usr/LOCAL/samba/private
from
drwxrwxrwx
to
dr-x------
for security reasons.
> #@boserup:/usr/LOCAL/samba/bin>./smbpasswd -a aperrin
[snip]
> startsmbpwent: opening file /usr/LOCAL/samba/private/smbpasswd
> /smbpasswd: Failed to open password file
> /usr/LOCAL/samba/private/smbpasswd.
> /smbpasswd: Error 0
[snip]
> BUT if I delete smbpasswd:
> #@boserup:/usr/LOCAL/samba/bin>./smbpasswd -a aperrin
[snip]
> /smbpasswd: Added user aperrin.
>
> This pattern holds for adding user or machine accounts; it also holds
> for changing the password in an existing entry.
I dunno about this part. The only that comes to mind is if the file is
locked. Can you write an C program and try to open smbpasswd for
writing and see what a stat() call gives?
j-
________________________________________________________________________
Gerald ( Jerry ) Carter
Engineering Network Services Auburn University
jerry at eng.auburn.edu http://www.eng.auburn.edu/users/cartegw
"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )
More information about the samba-ntdom
mailing list