
2 changed files with 13 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||
#!/bin/bash |
|||
if [[ -z $1 || -z $2 ]]; then |
|||
echo "Usage: $0 USER UID" |
|||
exit 1 |
|||
fi |
|||
|
|||
usr=$1 |
|||
uid=$2 |
|||
addgroup --gid ${uid:?} ${usr:?} --system |
|||
adduser --uid ${uid:?} --ingroup ${usr:?} ${usr:?} --disabled-password --gecos "" --system --no-create-home --shell /usr/sbin/nologin --home /nonexistent |
|||
printf "[User]\nSystemAccount=true\n" > /var/lib/AccountsService/users/${usr:?} |
@ -0,0 +1,2 @@ |
|||
#!/bin/sh |
|||
find $2 -type d -exec chmod $1 {} \; |
Loading…
Reference in new issue