Solved

Changing samba password problem

Posted on 2001-06-06
10
420 Views
Last Modified: 2010-03-18
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.
0
Comment
Question by:hazza96
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
  • 2
10 Comments
 
LVL 16

Expert Comment

by:The--Captain
ID: 6163203
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
 
LVL 17

Expert Comment

by:psimation
ID: 6164653
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
 
LVL 16

Expert Comment

by:The--Captain
ID: 6165495
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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

Author Comment

by:hazza96
ID: 6165890
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
 

Author Comment

by:hazza96
ID: 6165905
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
 
LVL 17

Accepted Solution

by:
psimation earned 300 total points
ID: 6166678
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
 

Author Comment

by:hazza96
ID: 6179927
No I didn't do that.

I will try it and tell you what happened.
0
 

Author Comment

by:hazza96
ID: 6193685
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
 

Author Comment

by:hazza96
ID: 6205481
Didn't fix both parts of my problem but at least root's password is getting stuffed around.
0
 

Author Comment

by:hazza96
ID: 6268328
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

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question