diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-11-20 12:18:46 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-11-20 12:18:46 +0100 |
commit | 5e812ee03bc39667edc12d171c56080c7a009f71 (patch) | |
tree | 809202da6579591b9927f50cf159c5a3cb7833ae /support-files | |
parent | 98c609248b421338f7df7eb0327433a9cf638cb0 (diff) | |
download | mariadb-git-5e812ee03bc39667edc12d171c56080c7a009f71.tar.gz |
MDEV-5303 rpm post-inst scriptlet creates mysql user with a valid shell
create mysql user with /sbin/nologin shell
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/rpm/server-postin.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh index b4d63815fe9..91885f73466 100644 --- a/support-files/rpm/server-postin.sh +++ b/support-files/rpm/server-postin.sh @@ -23,9 +23,9 @@ if [ $1 = 1 ] ; then # Create a MySQL user and group. Do not report any problems if it already # exists. groupadd -r %{mysqld_group} 2> /dev/null || true - useradd -M -r -d $datadir -s /bin/bash -c "MySQL server" -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true + useradd -M -r --home $datadir --shell /sbin/nologin --comment "MySQL server" --gid %{mysqld_group} %{mysqld_user} 2> /dev/null || true # The user may already exist, make sure it has the proper group nevertheless (BUG#12823) - usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true + usermod --gid %{mysqld_group} %{mysqld_user} 2> /dev/null || true # Change permissions so that the user that will run the MySQL daemon # owns all database files. |