Commit 44eff65f authored by Alejandro E. Rendon's avatar Alejandro E. Rendon
Browse files

Bash default shell

parent 0c2e2fde
......@@ -70,7 +70,7 @@ exports.getLinuxId = callback => {
};
exports.createUser = (uid, user, callback) => {
const path = `useradd -u ${uid} -g adm -g cdrom -g dip -g plugdev -g lpadmin -g sambashare -d /homeshare/${user.username} -m ${user.username}`;
const path = `useradd -u ${uid} -g adm -g cdrom -g dip -g plugdev -g lpadmin -g sambashare -d /homeshare/${user.username} -m ${user.username} && usermod -s /bin/bash ${user.username}`;
exec(path, (err, stdout, stderr) => {
if (err)
......@@ -85,13 +85,9 @@ exports.createUser = (uid, user, callback) => {
' | sudo chpasswd';
exec(passPath, (err, stdout, stderr) => {
if (err)
return callback(err);
else if (stderr)
return callback(stderr);
else {
return callback(null);
}
if (err) return callback(err);
else if (stderr) return callback(stderr);
else return callback(null);
});
}
});
......@@ -131,7 +127,7 @@ exports.sshKey = (user, callback) => {
return callback(stderr);
}
})
.exec('cat >> /homeshare/' + user.username + '/.bashrc', {
.exec(`cat >> /homeshare/${user.username}/.bashrc`, {
in: fs.readFileSync('./helpers/key')
})
.start();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment