Changing samba password problem

I have Mandrake 7.2 with samba 2.0.7 installed.

My WinME workstation can login to the samba box and run the logon.bat. It maps drives and sync's the time to the linux/samba box.

My problem is that I can't change the samba password from the Windows machine.

I go into 'Control Panel / Passwords', click on the 'Change Windows Password' button, tick the box next to 'Microsoft Networking' then enter the old password and the new password twice.

It thens comes back and says 'The password you typed is not correct for Microsoft Networking, blah blah..'

When I telnet into the linux box it wouldn't accept the root password when I tried to 'su' but did accept the password I tried to change my samba user name to.

So it went like this:

Before:
root with password of root01
user1 with password of pass01

I tried to change my samba user password to newone01

After:
root with password of newone01
user1 with password of pass01

How would a samba user trying to change their password change root's password? The user is an ordinary pleb user with no super user privlidges.
hazza96Asked:
Who is Participating?
 
psimationConnect With a Mentor Commented:
Tell me, when you setup samba the first time, did you ever run the command
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd ?
I think what's happening here is that instead of using samba's passwd file, you are using the system's passwd file, which is why you are getting these root password messups...
0
 
The--CaptainCommented:
In a DOS window, type:

net password \\servername

where servername is the netbios name of the server which you wish to change your password.

If you are not using smbpasswd, let me know and I'll find more stuff for you to try...

-Jon

0
 
psimationCommented:
You probably logged on to the samba network as user root, that's why it changed the password for root.
However, the best way to do this is to change the passwords on the linux box with the smbpasswd user command.
You can take a look at my website at www.linuxhelp.co.za and follow the networking link. It will show you how to configure samba to use encrypted passwords to allow win9x/2000 boxes to logion plus how to change the passwords etc.
Also, plz post your /etc/samba/smb.conf file here.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
The--CaptainCommented:
Oops - didn't notice the username mixup.

Try this (in a DOS window)

net password \\servername username

where servername is the netbios name of your samba server and username is the name of the user whose samba password you are trying to change

I agree with psimation about your appearing to be logged in as root - however, the above command should work for you, regardless (although it would probably be worth your while to figure out why windows thinks you are root rather than user1).


-Jon

0
 
hazza96Author Commented:
I am logged into the windows network as user1.

Those answers are good for me, I can even telnet in and run the smbpasswd command.

The problem is I am trying to set this up for the office and the users hardly know what the on/off button does let alone get to a DOS window.

Besides that those answers are work arounds not fixs. It SHOULDN'T change roots password, however it does, why and how to I get it to stop doing it.

Eventually someone on the network is going to try and use the control panel to change their password and I am going to lose the root password. That is not a good situation.
0
 
hazza96Author Commented:
Here's the Global and Netlogon sections of my smb.conf

[global]
    workgroup = 4ward
    guest account = nobody
    keep alive = 30
    os level = 2
    security = user
    printing = bsd
    printcap name = /etc/printcap
    load printers = yes
    passwd program = /usr/bin/passwd
    interfaces = 192.168.1.1/255.255.255.0
    wins support = yes
    domain master = yes
    preferred master = yes
    domain logons = yes
    logon path = \\felix\%U\profiles
    logon script = logon.bat
    logon drive = h:
    logon home = "\\felix\%U"
    encrypt passwords = yes
    unix password sync = yes
    server string = Samba Server
    map to guest = never
    password level = 0
    null passwords = no
    name resolve order = lmhosts, host, wins, bcast
    dead time = 0
    debug level = 0

[netlogon]
    comment = Logon script
    path = /home/system/samba/netlogon
    guest ok = no
    read only = yes
    locking = no
    available = yes
0
 
hazza96Author Commented:
No I didn't do that.

I will try it and tell you what happened.
0
 
hazza96Author Commented:
Well theres goods news and bad news.

The good news is that when the user tries to change thier password it doesn't stuff root's password.

The bad news is that they still can't change thier own. It still says 'The password you typed is not correct for Microsoft Networking....'
0
 
hazza96Author Commented:
Didn't fix both parts of my problem but at least root's password is getting stuffed around.
0
 
hazza96Author Commented:
Hey I found the actual answer. psimation was close the actual command I needed to run was

cat /etc/passwd |sh mksmbpasswd.sh > /etc/samba/smbpasswd

The 'sh' before the mksmbpasswd.sh was missing, everything works great now.
0
All Courses

From novice to tech pro — start learning today.