# No such file or directory /etc/pam.d/sshd on rebuild

**URL:** https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953
**Category:** Support
**Created:** [30 april 2020 om 17:49 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953 "2020-04-30T17:49:25Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![TheBaby5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebaby5/32/178897_2.png) [@TheBaby5](https://meta.discourse.org/u/TheBaby5)
#### Post date: [30 april 2020 om 17:49 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953/1 "2020-04-30T17:49:25Z")

</div>

This is the error I am getting when I did the upgrade via putty command line as shown in the image

 ![Screen Shot 2018-06-23 at 20.45.15](https://global.discourse-cdn.com/meta/original/3X/2/9/29f8320fa071df5be32c3c814092a44fec04d8e0.png)

THE ERROR!

```FAILED
--------------------
Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/pam.d/sshd
Location of failure: /pups/lib/pups/replace_command.rb:8:in `read'
replace failed with the params {"filename"=>"/etc/pam.d/sshd", "from"=>"session required pam_loginuid.so", "to"=>""}
ddb62e0d345db09cb179a21b8d32f8e8eebff02e1fa612885a42a4f8cdece4cd
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
root@maya:/var/discourse#
```

---

<div class="post-metadata">

### Author: ![RikoDEV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rikodev/32/126446_2.png) [@RikoDEV](https://meta.discourse.org/u/RikoDEV)
#### Post date: [30 april 2020 om 18:36 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953/2 "2020-04-30T18:36:31Z")

</div>

I have the same problem. After executing **./launcher rebuild app** the rebuild stops on the given error.

---

<div class="post-metadata">

### Author: ![kneiser](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kneiser/32/178608_2.png) [@kneiser](https://meta.discourse.org/u/kneiser)
#### Post date: [30 april 2020 om 21:16 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953/3 "2020-04-30T21:16:34Z")

</div>

Hmmm `/etc/pam.d/sshd`

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [30 april 2020 om 21:20 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953/4 "2020-04-30T21:20:23Z")

</div>

This is a old Discourse install right?

Can you please show which templates appear at the top of the app.yml file?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [30 april 2020 om 21:34 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953/5 "2020-04-30T21:34:21Z")

</div>

I just pushed [a fix](https://github.com/discourse/discourse_docker/commit/e46fe350e5705a51d293c24efc2fd3e314ab5655) for that problem - if you pull again and rebuild you should be fine.

---

<div class="post-metadata">

### Author: ![TheBaby5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebaby5/32/178897_2.png) [@TheBaby5](https://meta.discourse.org/u/TheBaby5)
#### Post date: [1 mei 2020 om 00:02 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953/6 "2020-05-01T00:02:50Z")

</div>

## Still receiving an error…

```plaintext
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 7 (delta 2), reused 6 (delta 2), pack-reused 0
Unpacking objects: 100% (7/7), 2.71 KiB | 693.00 KiB/s, done.
From https://github.com/discourse/discourse_docker
   4177d57..8c8dbd0 master -> origin/master
Updating 4177d57..8c8dbd0
Fast-forward
 templates/sshd.template.yml | 49 -------------------------------------------------
 1 file changed, 49 deletions(-)
 delete mode 100644 templates/sshd.template.yml
root@maya:/var/discourse# ./launcher rebuild app
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
cat: templates/sshd.template.yml: No such file or directory
cd /pups && git pull && /pups/bin/pups --stdin
/usr/bin/docker: invalid reference format: repository name must be lowercase.
See '/usr/bin/docker run --help'.
cat: cids/app_bootstrap.cid: No such file or directory
"docker rm" requires at least 1 argument.
See 'docker rm --help'.
Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]
Remove one or more containers
rm: cannot remove 'cids/app_bootstrap.cid': No such file or directory
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [1 mei 2020 om 00:50 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953/7 "2020-05-01T00:50:46Z")

</div>

Yeah this is me, that will break it even further.

You do not want the sshd template, no reason to be running sshd in your container.

Look at your container config, (`app.yml`), delete the line with `sshd` it is legacy you do not need. We stopped using this pattern 3 or so years ago but forgot to remove it properly.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [31 mei 2020 om 00:51 UTC](https://meta.discourse.org/t/no-such-file-or-directory-etc-pam-d-sshd-on-rebuild/149953/8 "2020-05-31T00:51:03Z")

</div>

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