# Rocky 8 with PAM authentication

**URL:** <https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018>\
**Category:** Get Help\
**Tags:** ondemand2\
**Created:** [April 20, 2022, 8:58pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018 "2022-04-20T20:58:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgross](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kgross/32/137_2.png) [@kgross](https://discourse.openondemand.org/u/kgross)\
**Post date:** [April 20, 2022, 8:58pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/1 "2022-04-20T20:58:52Z")

</div>

Hi All, I’m installing ondemand 2.0 on a Rocky 8.5 system. I see in RHEL 8 version OS’s that httpd is used instead of httpd24. When attempting to Add PAM Authentication from “[https://osc.github.io/ood-documentation/latest/authentication/pam.html](https://osc.github.io/ood-documentation/latest/authentication/pam.html)” step 7 says to run:

# /opt/ood/ood-portal-generator/sbin/update\_ood\_portal

When I run that I end up with errors that are pointing to httpd24.

Generating new Apache config at: ‘/opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf’  
sh: /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf: No such file or directory  
chown root:apache /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf  
No such file or directory @ apply2files - /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf  
Run ‘update\_ood\_portal --help’ to see a full list of available options.

Is there a config file somewhere that I can tell it which httpd I’m using? Thanks in advance, Kyle

---

<div class="post-metadata">

**Author:** ![travert](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/travert/32/3074_2.png) [@travert](https://discourse.openondemand.org/u/travert)\
**Post date:** [April 21, 2022, 3:19pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/2 "2022-04-21T15:19:36Z")

</div>

Hello and welcome!

I just need to be sure on the OS vesrion, what does ` cat /etc/os-release | grep VERSION` outuput? OOD should be picking that up dynamically to avoid something like this.

Also, when you output your `env` there isn’t anything there would would break things is there? Mainly thinking of something odd with `MODULEPATH` or something like that.

---

<div class="post-metadata">

**Author:** ![kgross](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kgross/32/137_2.png) [@kgross](https://discourse.openondemand.org/u/kgross)\
**Post date:** [April 21, 2022, 6:11pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/3 "2022-04-21T18:11:42Z")

</div>

Hi Travis, thanks for the response. That might be the issue. If I cat the entire /etc/os-release file on this system it only outputs:

```
PLATFORM_ID="platform:el8"

```

Unlike a Centos 7 system contains a lot more info. Maybe this is something to do with Rocky in particular.

The env is pretty generic. Though we are using modules so we do have MODULEPATH set. Here is the full contents.

_# env_  
_LS\_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:_.tar=01;31:_.tgz=01;31:_.arc=01;31:_.arj=01;31:_.taz=01;31:_.lha=01;31:_.lz4=01;31:_.lzh=01;31:_.lzma=01;31:_.tlz=01;31:_.txz=01;31:_.tzo=01;31:_.t7z=01;31:_.zip=01;31:_.z=01;31:_.dz=01;31:_.gz=01;31:_.lrz=01;31:_.lz=01;31:_.lzo=01;31:_.xz=01;31:_.zst=01;31:_.tzst=01;31:_.bz2=01;31:_.bz=01;31:_.tbz=01;31:_.tbz2=01;31:_.tz=01;31:_.deb=01;31:_.rpm=01;31:_.jar=01;31:_.war=01;31:_.ear=01;31:_.sar=01;31:_.rar=01;31:_.alz=01;31:_.ace=01;31:_.zoo=01;31:_.cpio=01;31:_.7z=01;31:_.rz=01;31:_.cab=01;31:_.wim=01;31:_.swm=01;31:_.dwm=01;31:_.esd=01;31:_.jpg=01;35:_.jpeg=01;35:_.mjpg=01;35:_.mjpeg=01;35:_.gif=01;35:_.bmp=01;35:_.pbm=01;35:_.pgm=01;35:_.ppm=01;35:_.tga=01;35:_.xbm=01;35:_.xpm=01;35:_.tif=01;35:_.tiff=01;35:_.png=01;35:_.svg=01;35:_.svgz=01;35:_.mng=01;35:_.pcx=01;35:_.mov=01;35:_.mpg=01;35:_.mpeg=01;35:_.m2v=01;35:_.mkv=01;35:_.webm=01;35:_.ogm=01;35:_.mp4=01;35:_.m4v=01;35:_.mp4v=01;35:_.vob=01;35:_.qt=01;35:_.nuv=01;35:_.wmv=01;35:_.asf=01;35:_.rm=01;35:_.rmvb=01;35:_.flc=01;35:_.avi=01;35:_.fli=01;35:_.flv=01;35:_.gl=01;35:_.dl=01;35:_.xcf=01;35:_.xwd=01;35:_.yuv=01;35:_.cgm=01;35:_.emf=01;35:_.ogv=01;35:_.ogx=01;35:_.aac=01;36:_.au=01;36:_.flac=01;36:_.m4a=01;36:_.mid=01;36:_.midi=01;36:_.mka=01;36:_.mp3=01;36:_.mpc=01;36:_.ogg=01;36:_.ra=01;36:_.wav=01;36:_.oga=01;36:_.opus=01;36:_.spx=01;36:_.xspf=01;36:\*  
_SSH\_CONNECTION=10.141.0.254 59720 10.141.0.249 22_  
_LANG=en\_US.UTF-8_  
_HISTCONTROL=ignoredups_  
_HOSTNAME=oodsrv001_  
_\_\_LMOD\_SET\_FPATH=1_  
_FPATH=/opt/ohpc/admin/lmod/lmod/init/ksh\_funcs_  
_which\_declare=declare -f_  
_XDG\_SESSION\_ID=6_  
_USER=root_  
_\_\_LMOD\_REF\_COUNT\_MODULEPATH=/opt/ohpc/admin/modulefiles:1;/opt/ohpc/pub/modulefiles:1_  
_PWD=/root_  
_HOME=/root_  
_LMOD\_COLORIZE=no_  
_SSH\_CLIENT=10.141.0.254 59720 22_  
_LMOD\_VERSION=8.5.22_  
_LMOD\_SETTARG\_CMD=:_  
_BASH\_ENV=/opt/ohpc/admin/lmod/lmod/init/bash_  
_ModuleTable001=X01vZHVsZVRhYmxlXyA9IHsKTVR2ZXJzaW9uID0gMywKY19yZWJ1aWxkVGltZSA9IGZhbHNlLApjX3Nob3J0VGltZSA9IGZhbHNlLApkZXB0aFQgPSB7fSwKZmFtaWx5ID0ge30sCm1UID0ge30sCm1wYXRoQSA9IHsKIi9vcHQvb2hwYy9hZG1pbi9tb2R1bGVmaWxlcyIsICIvb3B0L29ocGMvcHViL21vZHVsZWZpbGVzIiwKfSwKc3lzdGVtQmFzZU1QQVRIID0gIi9vcHQvb2hwYy9hZG1pbi9tb2R1bGVmaWxlczovb3B0L29ocGMvcHViL21vZHVsZWZpbGVzIiwKfQo=_  
_LMOD\_ROOT=/opt/ohpc/admin/lmod_  
_SSH\_TTY=/dev/pts/2_  
_MAIL=/var/spool/mail/root_  
_TERM=xterm_  
_SHELL=/bin/bash_  
_ModuleTable\_Sz=1_  
_SHLVL=1_  
_MANPATH=:/opt/pbs/share/man_  
_LMOD\_PREPEND\_BLOCK=normal_  
_MODULEPATH=/etc/scl/modulefiles:/opt/ohpc/admin/modulefiles:/opt/ohpc/pub/modulefiles_  
_LOGNAME=root_  
_DBUS\_SESSION\_BUS\_ADDRESS=unix:path=/run/user/0/bus_  
_XDG\_RUNTIME\_DIR=/run/user/0_  
_PATH=/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/pbs/bin:/opt/pbs/sbin_  
_MODULESHOME=/usr/share/Modules_  
_LMOD\_SETTARG\_FULL\_SUPPORT=no_  
_HISTSIZE=1000_  
_LMOD\_PKG=/opt/ohpc/admin/lmod/lmod_  
_LMOD\_CMD=/opt/ohpc/admin/lmod/lmod/libexec/lmod_  
_LESSOPEN=||/usr/bin/lesspipe.sh %s_  
_LMOD\_FULL\_SETTARG\_SUPPORT=no_  
_LMOD\_DIR=/opt/ohpc/admin/lmod/lmod/libexec_  
_BASH\_FUNC\_which%%=() { ( alias;_

- eval ${which\_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot “$@”\*  
_}_  
_BASH\_FUNC\_module%%=() { eval $($LMOD\_CMD bash “$@”) && eval $(${LMOD\_SETTARG\_CMD:-:} -s sh)_  
_}_  
_BASH\_FUNC\_scl%%=() { if [“$1” = “load” -o “$1” = “unload”]; then_
- eval “module $@”;\*
- else\*
- /usr/bin/scl “$@”;\*
- fi\*  
_}_  
_BASH\_FUNC\_ml%%=() { eval $($LMOD\_DIR/ml\_cmd “$@”)_  
_}_  
_\_=/usr/bin/env_

Kyle

---

<div class="post-metadata">

**Author:** ![deej](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@deej](https://discourse.openondemand.org/u/deej)\
**Post date:** [April 21, 2022, 6:24pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/4 "2022-04-21T18:24:14Z")

</div>

Hmm, that is strange. On my Rocky system I get:

$ cat /etc/os-release  
NAME=“Rocky Linux”  
VERSION=“8.5 (Green Obsidian)”  
ID=“rocky”  
ID\_LIKE=“rhel centos fedora”  
VERSION\_ID=“8.5”  
PLATFORM\_ID=“platform:el8”  
PRETTY\_NAME=“Rocky Linux 8.5 (Green Obsidian)”  
ANSI\_COLOR=“0;32”  
CPE\_NAME=“cpe:/o:rocky:rocky:8:GA”  
HOME\_URL=“[https://rockylinux.org/](https://rockylinux.org/)”  
BUG\_REPORT\_URL=“[https://bugs.rockylinux.org/](https://bugs.rockylinux.org/)”  
ROCKY\_SUPPORT\_PRODUCT=“Rocky Linux”  
ROCKY\_SUPPORT\_PRODUCT\_VERSION=“8”

-Dj

---

<div class="post-metadata">

**Author:** ![travert](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/travert/32/3074_2.png) [@travert](https://discourse.openondemand.org/u/travert)\
**Post date:** [April 21, 2022, 7:15pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/5 "2022-04-21T19:15:40Z")

</div>

I’m perplexed at the OS output, when I do the same i have:

```auto
NAME="Rocky Linux"
VERSION="8.5 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.5"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.5 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"

```

So something seems very off with the OS itself maybe? I’m not sure why you only have a `PLATFORM_ID` field being output from that file, but this would be a reason OOD can’t set itself up properly as it uses that for the OS version to build on.

---

<div class="post-metadata">

**Author:** ![kgross](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kgross/32/137_2.png) [@kgross](https://discourse.openondemand.org/u/kgross)\
**Post date:** [April 21, 2022, 8:05pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/6 "2022-04-21T20:05:18Z")

</div>

Well at least I know where to look now. This is basically a compute node built with OpenHPC. The head node reports correctly as your file does, but all my computes only have the single line output in os-release. I’ll do some digging to see why this is the case. Appreciate the pointer. I’ll let you know what I find. Kyle

---

<div class="post-metadata">

**Author:** ![kgross](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kgross/32/137_2.png) [@kgross](https://discourse.openondemand.org/u/kgross)\
**Post date:** [April 22, 2022, 2:36pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/7 "2022-04-22T14:36:16Z")

</div>

A step closer. I did get the update\_ood\_portal issue resolved. On a standard Rocky install /etc/os-release is a symbolic link to /usr/lib/os-release. The os-release file located in /usr/lib was correct, so I removed the one in /etc and created a symbolic like to /usr/lib/os-release. Now the correct apache is found.

At this point I get the sign on page to appear on the portal, but am unable to login with root or a user that are configured on the ood server.

I see these errors in /var/log/httpd/error.log  
PAM authentication failed for user nortech: Authentication failure  
AH01617: user nortech: authentication failure for “/pun/sys/dashboard”: Password Mismatch

Any ideas where to go from here? Thanks again

---

<div class="post-metadata">

**Author:** ![kgross](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kgross/32/137_2.png) [@kgross](https://discourse.openondemand.org/u/kgross)\
**Post date:** [April 22, 2022, 2:45pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/8 "2022-04-22T14:45:14Z")

</div>

A couple more notes:  
SSH authentication works and my pam.d config files are the same from ssh to ood.

# diff /etc/pam.d/sshd /etc/pam.d/ood

I’ve als modified the shadow file with permissions.

# ll /etc/shadow

-rw-r----- 1 root apache 1515 Apr 22 07:35 /etc/shadow

---

<div class="post-metadata">

**Author:** ![kgross](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kgross/32/137_2.png) [@kgross](https://discourse.openondemand.org/u/kgross)\
**Post date:** [April 22, 2022, 2:54pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/9 "2022-04-22T14:54:46Z")

</div>

Resolved - I figured it out. My shadow/group/passwd files were not sync’d correctly. SSH was working using SSH keys not password. Once I corrected those files I was able to authenticate. I appreciate the help. Kyle

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [October 19, 2022, 2:54pm UTC](https://discourse.openondemand.org/t/rocky-8-with-pam-authentication/2018/10 "2022-10-19T14:54:56Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
