Permalink
Browse files

Linux create_user: Add prey user to video/audio groups.

  • Loading branch information...
1 parent f1ff046 commit f554ad6777a6034f8239bf8dbc44c12d8d260d47 @tomas tomas committed Jan 24, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 scripts/create_user.sh
View
7 scripts/create_user.sh
@@ -56,8 +56,15 @@ create_user() {
if [ "$(uname)" == "Linux" ]; then
+ local groups="video audio plugdev netdev"
useradd -r -M -U -G ${ADMIN_GROUP} -s $SHELL $USER_NAME
+ for group in $groups; do
+ if getent group $group >/dev/null && ! getent group $group | grep -q $PREY_USER; then
+ adduser $USER_NAME $group &> /dev/null
+ fi
+ done
+
else
# create user using dscl

0 comments on commit f554ad6

Please sign in to comment.