rsh problem - "password expired" message

  • Follow


Hi,

I am trying to use rsh to execute a command as another user.
Say I have two user accounts user1 and user2.

I am able to execute a command from user1's account as user2. 
but I am not able to do the other way. Whenever I try to
execute a command from user2's account as user1. 
I am getting a message "password expired" even though the password
is changed recently.

I have created .rhosts files in both the accounts and entered
the servername and passwords in them.

Is there any other way to execute a command as another user?

Thanks
tvr
0
Reply tvr1729 2/19/2004 11:45:33 PM

tvr wrote:

> I have created .rhosts files in both the accounts and entered
> the servername and passwords in them.

Hum? Say what? Put the servername and USERNAME in them.

> 
> Is there any other way to execute a command as another user?
> 


(1)$ su -c 'command' user
(2)$ sudo -u user command

(3)
[as root]
chmod u+s command
chown user command
[as other_user]
../command


You can also use ssh as you are using rsh. I've no idea why is rsh 
complaining about passwd and you still can login as that user...


-- 
carlos ** http://cgd.sdf-eu.org
0
Reply Carlos 2/20/2004 2:26:42 AM


"Carlos J. G. Duarte" <cjgd@clix.pt> wrote in message news:<c13r80$1ckbmh$1@ID-201565.news.uni-berlin.de>...
> tvr wrote:
> 
> > I have created .rhosts files in both the accounts and entered
> > the servername and passwords in them.
> 
> Hum? Say what? Put the servername and USERNAME in them.
> 
> > 
> > Is there any other way to execute a command as another user?
> > 
> 
> 
> (1)$ su -c 'command' user
> (2)$ sudo -u user command
> 
> (3)
> [as root]
> chmod u+s command
> chown user command
> [as other_user]
> ./command
> 
> 
> You can also use ssh as you are using rsh. I've no idea why is rsh 
> complaining about passwd and you still can login as that user...

Thanks for the reply carlos. 
Anyway I used expect to do the task. I will try that some other time.
0
Reply tvr1729 2/21/2004 10:34:47 AM

2 Replies
257 Views

(page loaded in 0.105 seconds)

Similiar Articles:













7/30/2012 10:18:21 AM


Reply: