Skip to content

Commit

Permalink
Enable SSSD authentication by default in containers: uyuni-tools chan…
Browse files Browse the repository at this point in the history
…ges (#224)
  • Loading branch information
mbussolotto authored Apr 17, 2024
1 parent 9b102b6 commit 61cd3ef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions mgradm/shared/templates/postUpgradeScriptTemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ else
sed 's/uyuni_authentication_endpoint.*/uyuni_authentication_endpoint: http:\/\/localhost/' -i /etc/cobbler/settings.yaml;
fi
{{ end }}
grep pam_auth_service /etc/rhn/rhn.conf
if [ $? -eq 1 ]; then
echo 'pam_auth_service = susemanager' >> /etc/rhn/rhn.conf
else
sed 's/pam_auth_service.*/pam_auth_service = susemanager/' -i /etc/rhn/rhn.conf;
fi
{{ end }}
`

// PostUpgradeTemplateData represents information used to create post upgrade.
Expand Down
4 changes: 3 additions & 1 deletion shared/utils/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ var EtcServerVolumeMounts = []types.VolumeMount{
{MountPath: "/etc/cobbler", Name: "etc-cobbler"},
{MountPath: "/etc/sysconfig", Name: "etc-sysconfig"},
{MountPath: "/etc/postfix", Name: "etc-postfix"},
{MountPath: "/etc/sssd", Name: "etc-sssd"},
}

// EtcServerVolumeMounts represents volumes used for configuration.
// EtcServerVolumes represents volumes used for configuration.
var EtcServerVolumes = []types.Volume{
{Name: "etc-apache2", PersistentVolumeClaim: &types.PersistentVolumeClaim{ClaimName: "etc-apache2"}},
{Name: "etc-systemd-multi", PersistentVolumeClaim: &types.PersistentVolumeClaim{ClaimName: "etc-systemd-multi"}},
Expand All @@ -53,6 +54,7 @@ var EtcServerVolumes = []types.Volume{
{Name: "etc-sysconfig", PersistentVolumeClaim: &types.PersistentVolumeClaim{ClaimName: "etc-sysconfig"}},
{Name: "etc-postfix", PersistentVolumeClaim: &types.PersistentVolumeClaim{ClaimName: "etc-postfix"}},
{Name: "etc-rhn", PersistentVolumeClaim: &types.PersistentVolumeClaim{ClaimName: "etc-rhn"}},
{Name: "etc-sssd", PersistentVolumeClaim: &types.PersistentVolumeClaim{ClaimName: "etc-sssd"}},
}

var etcAndPgsqlVolumeMounts = append(PgsqlRequiredVolumeMounts, EtcServerVolumeMounts[:]...)
Expand Down
1 change: 1 addition & 0 deletions uyuni-tools.changes.mbussolotto.pam
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Allow PAM and LDAP authentication using SSSD

0 comments on commit 61cd3ef

Please sign in to comment.