Re: Execute usermod command via remsh on HP UX (684 Views)
Reply
Occasional Contributor
Posts: 8
Registered: ‎07-05-2011
Message 1 of 3 (707 Views)

Execute usermod command via remsh on HP UX

Hi Experts,

 

I tried to execute the remsh command via remsh, it got failed. I am able to execute commands, bdf, cat..  via remsh.

 

Here I am attaching the command details I used and the error messages. Kindly let me know whether usermod will support with remsh on hp ux. current os version is 11.31 and trying to execute on different flavors.

 

for i in `cat wkh`
do
print "doing $i"
remsh $i /usr/sbin/usermod-c "Wajid Khan, Genpact SAP Basis Team" wkhan
done

 

------------------------------------------------------------

 

Error

====

# ./id
doing lccdb042
User name must be specified
Usage: usermod.sam [-p <passwd> [-u <uid> [-o]] [-g <group> [-G <group>[,<group...> [-d <dir> [-m]] [-s <shell>] [-c <comment>] [-f <inactive>] [-e <expire>] [-l <new logname>] <login>

 

 

and tried with /usr/sam/lbin/usermod.sam combination also, probing same result.

 

Thanks in Advance.

 

 

 

 

Honored Contributor
Posts: 9,111
Registered: ‎02-23-2005
Message 2 of 3 (690 Views)

Re: Execute usermod command via remsh on HP UX

Occasional Contributor
Posts: 8
Registered: ‎07-05-2011
Message 3 of 3 (684 Views)

Re: Execute usermod command via remsh on HP UX

Hi,

 

Thanks for extreme support. I have executed the command with with help of single quote. It was success.

 

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.