Re: [LIP] passwd wrapper

Sandip Bhattacharya <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Organization Puroga Technologies Pvt. LTd.
Message-ID <[email protected]>
Godbole, Amarendra (GE Consumer & Industrial) wrote:
>>Why cant you simply ask the user for his password, and set it in the 
>>system using "passwd --stdin username" (using sudo 
>>permissions given to 
>>your script or somethign similar)?
> 
> 
> I have to support this on Linux as well as AIX. --stdin is only available
> with Linux. :(
> 

So you need a "cross-platform" password modification utility.Obviously, 
you need to also have the same program work with /etc/passwd and 
/etc/shadow too, and with Crypt and MD5 based passwords too!
Bless you.   :)

I dont see any way out rather than writing a suid perl script which 
works out these differences, and either edit these files directly ( 
managing locks etc. Yeesh) which should not be very difficult in perl or 
use the platform specific tools (passwd --stdin in case of linux, etc.).

- Sandip


-- 
Sandip Bhattacharya
sandip (at) puroga.com
Puroga Technologies Pvt. Ltd.
Work: http://www.puroga.com        Home: http://www.sandipb.net

GPG: 51A4 6C57 4BC6 8C82 6A65 AE78 B1A1 2280 A129 0FF3



-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.