Operating System - HP-UX
1752682 Members
5520 Online
108789 Solutions
New Discussion юеВ

Re: Execute usermod command via remsh on HP UX

 
unix_3608
Occasional Contributor

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.

 

 

 

 

2 REPLIES 2
Steven Schweda
Honored Contributor

Re: Execute usermod command via remsh on HP UX

 
unix_3608
Occasional Contributor

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.