From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Wed 01 Jan 2003 - 17:38:20 GMT
On Wed, Jan 01, 2003 at 09:27:54AM -0800, Robert Rolfe wrote:
> Yes.. But how would you send that to a vserver that was just created in
> 1 line?
> I tried the following:
> [root_at_vps root]# vserver test exec "/bin/echo <pass> | /usr/bin/passwd
> --stdin root"
> ipv4root is now 126.96.36.199
> New security context is 21
> Can't execute /bin/echo <pass> | /usr/bin/passwd --stdin root (No such
> file or directory)
> [root_at_vps root]#
> And got that result...
> Any idea's?
(maybe not so) obviously ...
# vserver test exec "ls | wc"
Can't execute ls | wc (No such file or directory)
... fails, because there is no such command, and you
have to use the shell to do shell stuff ;) ...
# vserver test exec bash -c "ls | wc"
14 14 67
> -----Original Message-----
> From: Herbert Poetzl [mailto:herbert_at_13thfloor.at]
> Sent: Wednesday, January 01, 2003 8:09 AM
> To: vserver_at_solucorp.qc.ca
> Subject: Re: [vserver] vserver creation from command line
> On Wed, Jan 01, 2003 at 12:56:40AM -0800, Robert Rolfe wrote:
> > ok, so far i have figured out how to create a vserver from the
> > line on the main system without using the newvserver command. The
> > only thing i have yet to figure out is how the newvserver command
> > the root password for the new vserver... can anyone shed some
> > on this subject? any way to do this all in one command? eg
> > blah exec passwd root <password>"??
> passwd --stdin
> or if you have an already crypted password
> usermod -p "<crypted password>" root
> > Any help would be appriciated...
> > Thanks,
> > Rob.