to change password of user y from user x account you can use  sudo
command. for this u have to configure sudoers file by visudo command.
specify the user alias, command alias and then permissions. this is the
best way. 
if u want to do with a script then make the script executable as suid by
chmod 4xxx replace xxx with the permissions. 

vineet
On Tue, 2002-12-31 at 18:35, Manish Gulati wrote:
> 
> Happy New Year !!!
> 
> Can somebody tell me how to run a script by a normal user in setuid root mode. I am 
>using Redhat 6.2 system. I need to change password of user X from User Y account 
>through the script and both of them are not superuser.
> 
> I have already tried set -p command in script and the following code
> 
> #!/bin/ksh
> 
> su -l << EOP
> 
> <root passwd>
> 
> EOP
> 
>  
> 
> But that doesn't works
> 
> Any help appreciated. Regards
> 
>  
> 
> Jas
> 
>  
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to