The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Scripts and changing users bonekrusher UNIX for Dummies Questions & Answers 1 02-05-2008 08:55 AM
Changing Directory Using SFU ilak1008 Windows & DOS: Issues & Discussions 1 05-22-2007 02:50 AM
Changing userID and Changing group and GID deal732 Shell Programming and Scripting 2 04-18-2007 10:09 AM
Changing IP's Hordak UNIX for Dummies Questions & Answers 2 08-03-2002 12:42 AM
Changing Users Passwords Via Script? PJolliffe UNIX for Advanced & Expert Users 3 04-10-2002 08:54 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-31-2003
Bab00shka Bab00shka is offline
Registered User
  
 

Join Date: Apr 2002
Location: Chesterfield, UK
Posts: 123
Question Changing Users

Hi,

This question has been asked before in the forums but I have not seen an appropriate answer.

I need a script to change user, perform a command then revert to the original user without anyone having to input a password on the screen. Neither user is root. I am using HP-UX11 and scripting in KSH. Perl is unfortunately not an option.

Is it possible to change users using KSH without any manual input from the screen.

Many thanks
Helen
  #2 (permalink)  
Old 08-01-2003
inquirer's Avatar
inquirer inquirer is offline
Registered User
  
 

Join Date: Aug 2001
Posts: 79
you must do the following:

1. on the remote user define the local user and hostname in the .rhosts file.

e.g., from server2 define in the .rhosts file:

server1 localuser

2. use remsh to execute a command from the other user.

e.g., remsh server2 -l remoteuser -n command
  #3 (permalink)  
Old 08-01-2003
s93366's Avatar
s93366 s93366 is offline
Registered User
  
 

Join Date: Apr 2002
Location: Sweden / Stockholm
Posts: 168
Check out sudo

http://www.sudo.ws/sudo/

It can do what you are asking for.

Have a nice one!

/peter
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0