Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Hacksaar
Sphinx
Commits
97036270
Commit
97036270
authored
Nov 09, 2013
by
Ralf
Browse files
add a script to add tuer users
parent
d084286e
Changes
1
Hide whitespace changes
Inline
Side-by-side
adduser
0 → 100755
View file @
97036270
#!/bin/bash
USER
=
"
$1
"
if
[[
-z
"
$USER
"
]]
;
then
echo
"Usage:
$0
username"
exit
1
fi
if
[[
"
$(
whoami
)
"
!=
"root"
]]
;
then
echo
"Please get root first"
exit
1
fi
adduser
"
$USER
"
--disabled-password
sudo
adduser
"
$USER
"
tuer
cd
/home/
"
$USER
"
mkdir
.ssh
echo
-n
"I will now open nano, please paste the SSH key in there! "
read
nano .ssh/authorized_keys
chown
"
$USER
"
:
-R
.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment