Here's my script:<br>--------------------------------------------------  chpass.sh --------------------------------------------------<br>#!/bin/bash<br>echo "Instructions:"<br>echo ""<br>echo "You will need to type your old password once, then you new password twice."<br>
echo "Nothing will show up on the screen when you are typing, just press enter "<br>echo "after each password. Your password must be at least 6 characters long"<br>echo ""<br>echo "If everything worked, then you will get this message after typing all of"<br>
echo "your passwords: Password changed for user ... "<br>echo ""<br>/usr/bin/smbpasswd -r <a href="http://192.168.10.110">192.168.10.110</a><br>read -p "Press any key exit"<br>-------------------------------------------------------------------------------------------------------------------<br>
<br>Command to run:<br>xterm -e "sh /usr/local/scripts/chpass.sh"<br> <br>IceWM menu command:<br>prog "Change My Password" /usr/share/icons/crystalsvg/16x16/actions/edit_user.png xterm -e "sh /usr/local/scripts/chpass.sh"<br>

<br><br><div class="gmail_quote">2008/11/21 Rob Owens <span dir="ltr"><<a href="mailto:rob.owens@biochemfluidics.com">rob.owens@biochemfluidics.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hmm, this is a little more complicated than I thought.<br>
<br>
I came up with a simpler idea though.  Create a custom launcher (for<br>
Gnome) that runs smbpasswd in a terminal.  Here it is, as text and as an<br>
attachment:<br>
<br>
[Desktop Entry]<br>
Encoding=UTF-8<br>
Version=1.0<br>
Type=Application<br>
Terminal=true<br>
Icon[en_US]=/usr/share/pixmaps/password.png<br>
Name[en_US]=Password<br>
Exec=/usr/bin/smbpasswd<br>
Comment[en_US]=Change your Samba password<br>
Name=Password<br>
Comment=Change your Samba password<br>
Icon=/usr/share/pixmaps/password.png<br>
<br>
If you want to provide some additional text for instructions, you can<br>
make the launcher call myscript.sh instead of smbpasswd.  myscript.sh<br>
would then be something like:<br>
<br>
#!/bin/bash<br>
echo "This utility will change your Linux and Windows password.  Please<br>
answer the following questions"<br>
/usr/bin/smbpasswd<br>
<font color="#888888"><br>
-Rob<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
Rob Owens wrote:<br>
> Last time I tried, "passwd" did not work.  "smbpasswd" did work, though.<br>
>  Additionally, changing their password from a Windows machine supposedly<br>
> works (but I didn't test that).<br>
><br>
> I don't know of a GUI for this.  You could probably write a quick one<br>
> using zenity.  Zenity makes it really easy to create dialog boxes.<br>
> Go to System, Help, and search for zenity.<br>
><br>
> I'll see if I can piece together a script tomorrow.  Don't hold your<br>
> breath, though -- I'm not an expert.<br>
><br>
> -Rob<br>
><br>
><br>
> Carl Keil wrote:<br>
>> Rob,<br>
>><br>
>> Thank you for your reply.<br>
>> I think I'd be OK with just telling people they needed to do it.  If<br>
>> someone cracks their account and messes around it'll be a learning<br>
>> experience for them.<br>
>><br>
>> I'm not clear on how ordinary users change their password in the SMBLDAP<br>
>> scheme though.   Does "passwd" work?  Is there a GUI?  These people are<br>
>> on clients, not the server.  And I want it to change the password in the<br>
>> LDAP database.<br>
>><br>
>> Thanks,<br>
>><br>
>> ck<br>
>><br>
>><br>
>><br>
>>> Date: Thu, 20 Nov 2008 07:53:14 -0500 From: Rob Owens<br>
>>> <<a href="mailto:rob.owens@biochemfluidics.com">rob.owens@biochemfluidics.com</a>> Subject: Re: SMBLDAP - Requiring and<br>
>>> facilitating password change at first logon To: "Support list for open<br>
>>> source software in schools." <<a href="mailto:k12osn@redhat.com">k12osn@redhat.com</a>> Message-ID:<br>
>>> <<a href="mailto:49255DBA.8040308@biochemfluidics.com">49255DBA.8040308@biochemfluidics.com</a>> Content-Type: text/plain;<br>
>>> charset="iso-8859-1" I don't know how to force that. But you could<br>
>>> *tell* them to do it, and then run a script the next day that attempts<br>
>>> to log in each student using the password that you assigned. If it's<br>
>>> successful, it can then change/disable the password, or email you, or<br>
>>> put their name on a list, or something. That way you'll know who<br>
>>> didn't follow instructions. -Rob Carl Keil wrote:<br>
>>>>> Hey,<br>
>>>>>> I've gotten a SMBLDAP server going on Centos.  I think it works<br>
>>>> really<br>
>>>>> well through all the testing I've done.  I'm about to convert people<br>
>>>>> over to using it.  What's the best way for making the kids change<br>
>>>> the PW<br>
>>>>> at first login (I didn't assign very good passwords when I set up the<br>
>>>>> accounts and now I'm worrying about it.)  Is there a GUI way to do<br>
>>>> this?<br>
>>>>>> Is there a way in LDAP to keep a person in the DB but not let<br>
>>>> them log<br>
>>>>> into workstations?  Like to toggle some sort of "active" field in<br>
>>>> the db?<br>
>>>>>> Oh, BTW all the workstations are Ubuntu 8.04, I'm hoping that<br>
>>>> simplifies<br>
>>>>> things.<br>
>>>>>> Thanks,<br>
>>>>>> ck<br>
>> __________<br>
</div></div><div><div></div><div class="Wj3C7c">********************************************************<br>
<br>
The information transmitted is intended only for the person or entity to<br>
which it is addressed and may contain confidential and/or privileged<br>
material. If you are not the addressee, any disclosure, reproduction,<br>
copying, distribution, or other dissemination or use of this transmission in<br>
error please notify the sender immediately and then delete this e-mail.<br>
E-mail transmission cannot be guaranteed to be secure or error free as<br>
information could be intercepted, corrupted lost, destroyed, arrive late or<br>
incomplete, or contain viruses.<br>
The sender therefore does not accept liability for any errors or omissions<br>
in the contents of this message which arise as a result of e-mail<br>
transmission. If verification is required please request a hard copy<br>
version.<br>
<br>
********************************************************<br>
</div></div><br>_______________________________________________<br>
K12OSN mailing list<br>
<a href="mailto:K12OSN@redhat.com">K12OSN@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/k12osn" target="_blank">https://www.redhat.com/mailman/listinfo/k12osn</a><br>
For more info see <<a href="http://www.k12os.org" target="_blank">http://www.k12os.org</a>><br></blockquote></div><br>