Skip to content
Snippets Groups Projects
Commit cfee1178 authored by Filip Strömbäck's avatar Filip Strömbäck
Browse files

Updated the scripts for OpenDSA - nologin on the account.

parent 8ef9ffd7
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
OPENDSA_HOME="/srv/opendsa"
if [ $# == 0 ] if [ $# == 0 ]
then then
echo "This script is only intended for managing the server. Please provide one argument as an action!" echo "This script is only intended for managing the server. Please provide one argument as an action!"
exit 1 exit 1
fi fi
cd ~/OpenDSA/server/
~/OpenDSA/server/main.py "$@" if [[ $(whoami) != "opendsa" ]]
then
sudo -u opendsa $OPENDSA_HOME/manage.sh "$@"
exit $?
fi
cd $OPENDSA_HOME/OpenDSA/server/
$OPENDSA_HOME/OpenDSA/server/main.py "$@"
exit $?
...@@ -2,7 +2,7 @@ klaar36 ALL=(ALL) NOPASSWD: ALL ...@@ -2,7 +2,7 @@ klaar36 ALL=(ALL) NOPASSWD: ALL
filst04 ALL=(ALL) NOPASSWD: ALL filst04 ALL=(ALL) NOPASSWD: ALL
User_Alias EXAM_ADMINS = torjo38, klaar36, vikol94, magni54, filst04 User_Alias EXAM_ADMINS = torjo38, klaar36, vikol94, magni54, filst04
Runas_Alias EXAM_USER = examadm, %examadm Runas_Alias EXAM_USER = examadm, %examadm, opendsa, %opendsa
Cmnd_Alias SERVICE_CMDS = /usr/bin/systemctl /usr/bin/less Cmnd_Alias SERVICE_CMDS = /usr/bin/systemctl /usr/bin/less
......
...@@ -12,8 +12,7 @@ class aes::opendsa { ...@@ -12,8 +12,7 @@ class aes::opendsa {
managehome => false, managehome => false,
membership => inclusive, membership => inclusive,
system => true, system => true,
# Do we need login shell. YES shell => '/sbin/nologin',
shell => '/bin/bash',
} }
file { "${opendsa_home}": file { "${opendsa_home}":
...@@ -63,7 +62,7 @@ class aes::opendsa { ...@@ -63,7 +62,7 @@ class aes::opendsa {
ensure => present, ensure => present,
owner => "${opendsa_user}", owner => "${opendsa_user}",
group => "${opendsa_group}", group => "${opendsa_group}",
mode => '0751', mode => '0755',
source => "puppet:///modules/${module_name}/opendsa/manage.sh", source => "puppet:///modules/${module_name}/opendsa/manage.sh",
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment