#!/bin/bash

# Copyright (C) 2016 NIWA Hideyuki


# check root
if [ ${EUID:-${UID}} != 0 ]; then
    echo "error: Because you are not root, you cannot execute this command. "
    exit 1
fi

usage()
{
	echo "usage: lib-set-passwd NAME USER" 
}

if [ $# -ne 2 ]; then
	usage
	exit -1
fi

LXCNAME=$1
USERNAME=$2
fulcon-exec $LXCNAME /usr/bin/passwd $USERNAME

exit 0
