diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-05-15 02:29:01 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-05-15 02:29:01 -0500 |
commit | 46af8229026a6122ca640f063c24d68876acdb11 (patch) | |
tree | 168f6993708f254a940dff521f52c03bb0aeb59a /hscript/user.cc | |
parent | 5ae043001202cd064334c3c826ba3c4f656699ec (diff) | |
download | horizon-46af8229026a6122ca640f063c24d68876acdb11.tar.gz horizon-46af8229026a6122ca640f063c24d68876acdb11.tar.bz2 horizon-46af8229026a6122ca640f063c24d68876acdb11.tar.xz horizon-46af8229026a6122ca640f063c24d68876acdb11.zip |
hscript: Ensure user commands are correct in simulator
Diffstat (limited to 'hscript/user.cc')
-rw-r--r-- | hscript/user.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/hscript/user.cc b/hscript/user.cc index de92067..0dc4eba 100644 --- a/hscript/user.cc +++ b/hscript/user.cc @@ -219,7 +219,8 @@ bool Username::execute() const { "username: creating account " + _value); if(script->options().test(Simulate)) { - std::cout << "useradd -c \"Adélie User\" -m -U " << _value + std::cout << "useradd -c \"Adélie User\" -m -R " + << script->targetDirectory() << " -U " << _value << std::endl; return true; } @@ -263,7 +264,8 @@ bool UserAlias::execute() const { "useralias: setting GECOS name for " + _username); if(script->options().test(Simulate)) { - std::cout << "usermod -c \"" << _alias << "\" " << _username + std::cout << "usermod -c \"" << _alias << "\" " + << "-R " << script->targetDirectory() << " " << _username << std::endl; return true; } @@ -312,7 +314,8 @@ bool UserPassphrase::execute() const { "userpw: setting passphrase for " + _username); if(script->options().test(Simulate)) { - std::cout << "usermod -p '" << _passphrase << "' " << _username + std::cout << "usermod -p '" << _passphrase << "' " + << "-R " << script->targetDirectory() << " " << _username << std::endl; return true; } @@ -473,7 +476,9 @@ bool UserGroups::execute() const { groups.pop_back(); if(script->options().test(Simulate)) { - std::cout << "usermod -aG " << groups << " " << _username << std::endl; + std::cout << "usermod -aG " << groups + << "-R " << script->targetDirectory() + << " " << _username << std::endl; return true; } |