Changing userID and Changing group and GID

Hello,

I want to write a ksh script about changing UID and changing group with GID. There are multiple servers i want to perform that job.

linux1
linux2
linux3
linux4
linux5 ......
.
.
.
.
.

1.) How can i enter "password" in script rather asking me?

I was trying this...

ssh csmith@linux

echo 'PASSWD="xxxxx"'

2) The above job has to perform on root level how can i have machine enter su - and it password?

then

su -

echo 'PASSWD="xxxxx"'

-Adeel

If you absolutely must do this thing using PASSWD, then there is no way around using expect. Programs like su won't allow you to supply the password with something as simple as input redirection.

is it possible on the password prompt i enter a password by my self? then it perform other commands.

-adeel