The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Changing prompt kjbaumann SUN Solaris 2 06-29-2006 10:05 AM
changing group ID frankkahle Filesystems, Disks and Memory 4 05-19-2006 10:24 AM
File group ownership changing automatically top_gun UNIX for Advanced & Expert Users 1 12-09-2005 11:37 AM
Changing the Effective Group ID Jody UNIX for Dummies Questions & Answers 2 12-05-2002 11:53 AM
Changing IP's Hordak UNIX for Dummies Questions & Answers 2 08-02-2002 09:42 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-18-2007
Registered User
 

Join Date: Apr 2007
Posts: 10
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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-18-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,323
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.
Reply With Quote
  #3 (permalink)  
Old 04-18-2007
Registered User
 

Join Date: Apr 2007
Posts: 10
is it possible on the password prompt i enter a password by my self? then it perform other commands.

-adeel
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0