add function to change users in sshs
This commit is contained in:
parent
f846717901
commit
58feedfcf7
1 changed files with 9 additions and 0 deletions
|
@ -1466,6 +1466,15 @@ EOF
|
||||||
# shopt -u extglob
|
# shopt -u extglob
|
||||||
eval $SHOPTEXTGLOB
|
eval $SHOPTEXTGLOB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chuser () {
|
||||||
|
[ $(id -u) -gt 0 ] && return
|
||||||
|
u_id="$(id -u $1)"
|
||||||
|
g_id="$(id -g $1)"
|
||||||
|
install -o ${u_id} -g ${g_id} -m 0700 /run/user/${u_id}
|
||||||
|
cp ${getbashrcfile} /run/user/${u_id}/.
|
||||||
|
cp ${getvimrcfile} /run/user/${u_id}/.
|
||||||
|
}
|
||||||
#EOF
|
#EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue