Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows 2000 Pro joing Samba 'Domain'

Status
Not open for further replies.

escheider

IS-IT--Management
Sep 21, 2001
24
0
0
US
Hello:

I've just recently upgraded Samba to 2.2.2 so Windows 2000 professional machines can participate on the domain. However, when I tell it to join the domain, and type in a username and password, it says 'Unknown username or bad password'

Im not a Linux guru, so if someone could give me some steps to get this resolved and on the right track, I'd appreciate it.

Thanks
 
Hi,

Assuming the samba server is set up correctly as PDC, you need to create machine accounts for each NT/W2K client that is going to join the domain. This can be done manually as root :

# /usr/sbin/useradd -g 100 -d /dev/null -c machine_comment -m -s /bin/false w2kbox1$

(Where 'w2kbox1' is an example netbiosname of a W2K client box !)

Then you do the equivalent smb password step :

# smbpasswd -a -m w2kbox1

After that the client should be able to join your domain....

You can also do the equivalent to the above on the fly by adding an entry to smb.conf like this :

add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u

However, this requires that root has an entry in smbpasswd (i.e. is a recognised samba user). If you do this, set the root smb password to something different that the 'real' root password for security reasons.

Hope this helps



 
I've had the server up and running for several months now, just upgraded it the other day, so I assume its set up correctly to.

I have already added the machine account to the samba box, but still get the same error message.

Any other ideas?
 
Ok, it appears Im having problems with smbpasswd file. If I try to add a new user, I keep getting an error that it cannot lock this file and doesn't update my changes.

it appears that when i updated samba, it removed mksmbpasswd.sh script. How do I recover this script?
 
Ok, here is the exact error message when I try to invoke smbpasswd:


startsmbfilepwent_internal: unable to lock file /etc/samba/smbpasswd. Error was
Cannot open file /etc/samba/smbpasswd. Error was Invalid argument
 
Hi,

Well, the first thing to check would be that the permissions on the actual smbpasswd file allow for r/w access by the userid under which samba is running, if not root.

Looking thru the code --> I can't see anything except possible race conditions but that doesn't fit in with 'invalid argument'. I guess you could try again after stopping samba.

Otherwise it might just be the following bug (snip from 2.2.1a release notes ) :

The release notes for 2.2.1a follow :

This is a minor bugfix release for 2.2.1, *NOT* security related.

1). 2.2.1 had a bug where using smbpasswd -m to add a Windows NT or Windows2000 machine into a Samba hosted PDC would fail due to our stricter user name checking. We were disallowing user names containing '$', which is needed when using smbpasswd to add a machine into a domain. Automatically adding machines (using the native Windows tools) into a Samba domain worked correctly.

2.2.1a fixes this single problem.


So, I'd try 2.2.1a if you don't have that version.

Hope this helps
 
ok, i've installed 2.2.1a using rpm, but it didn't seem to install mksmbpasswd.sh. How is this recreated?
 
ok, i installed 2.2.1a and it appears that smbd isn't starting. Here is the error I get in the smbd log:

I'm getting closer. It appears that smbd isn't starting. I checked out the smbd log file and here
is the error. I couldn't find anything on the net about it:

ERROR: smbd : fcntl lock of file /var/cache/samba/smbd.pid failed. Error was Invalid argument
 
Hi,

Well a file named whatever.pid is just a file that contains the process id number (as reported by ps) of a running process. Its normally used by scripts to terminate or otherwise send a signal to a running process.

If you are running samba (smbd) as root, I could only guess that maybe there is an old .pid file that needs removing. If you do a

ls -l /var/cache/samba

does it show a non-current date / time ? If so, just remove that .pid file and any other stray lock files left lying around.


Regards

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top