# pam-pgsql not working :(



## alex_PL (Oct 31, 2011)

Hello I have problem when install security/pam-pgsql.


```
FreeBSD: Installing pam_pgsql.so to /usr/lib
install: chown 0:4294967295 /usr/lib: Read-only file system
install: chmod 755 /usr/lib: Read-only file system
install: /usr/lib/pam_pgsql.so: Read-only file system
*** Error code 71

Stop in /var/ports/basejail/usr/ports/security/pam-pgsql/work/pam-pgsql-0.6.3.
*** Error code 1
```


FreeBSD 8.2-RELEASE

Please help me


----------



## SirDice (Oct 31, 2011)

Try reading the actual message.


```
install: chmod 755 [b]/usr/lib: Read-only file system[/b]
```


----------



## alex_PL (Nov 7, 2011)

This install in jail, and when I change privileges nothing has changed, still privileges is

```
-rwxrwxr-x   1 root  wheel     6500 Sep 29 22:44 pam_lastlog.so.5
lrwxr-xr-x   1 root  wheel       21 Sep 29 22:44 pam_login_access.so -> pam_login_access.so.5
-rwxrwxr-x   1 root  wheel     7744 Sep 29 22:44 pam_login_access.so.5
lrwxr-xr-x   1 root  wheel       16 Sep 29 22:44 pam_nologin.so -> pam_nologin.so.5
-rwxrwxr-x   1 root  wheel     4988 Sep 29 22:44 pam_nologin.so.5
lrwxr-xr-x   1 root  wheel       13 Sep 29 22:44 pam_opie.so -> pam_opie.so.5
-rwxrwxr-x   1 root  wheel     5216 Sep 29 22:44 pam_opie.so.5
lrwxr-xr-x   1 root  wheel       19 Sep 29 22:44 pam_opieaccess.so -> pam_opieaccess.so.5
-rwxrwxr-x   1 root  wheel     4532 Sep 29 22:44 pam_opieaccess.so.5
lrwxr-xr-x   1 root  wheel       17 Sep 29 22:44 pam_passwdqc.so -> pam_passwdqc.so.5
-rwxrwxr-x   1 root  wheel    40396 Sep 29 22:44 pam_passwdqc.so.5
lrwxr-xr-x   1 root  wheel       15 Sep 29 22:44 pam_permit.so -> pam_permit.so.5
-rwxrwxr-x   1 root  wheel     3692 Sep 29 22:44 pam_permit.so.5
lrwxr-xr-x   1 root  wheel       15 Sep 29 22:44 pam_radius.so -> pam_radius.so.5
-rwxrwxr-x   1 root  wheel     9064 Sep 29 22:44 pam_radius.so.5
lrwxr-xr-x   1 root  wheel       15 Sep 29 22:44 pam_rhosts.so -> pam_rhosts.so.5
-rwxrwxr-x   1 root  wheel     3896 Sep 29 22:44 pam_rhosts.so.5
lrwxr-xr-x   1 root  wheel       15 Sep 29 22:44 pam_rootok.so -> pam_rootok.so.5
-rwxrwxr-x   1 root  wheel     3692 Sep 29 22:44 pam_rootok.so.5
lrwxr-xr-x   1 root  wheel       18 Sep 29 22:44 pam_securetty.so -> pam_securetty.so.5
-rwxrwxr-x   1 root  wheel     4248 Sep 29 22:44 pam_securetty.so.5
lrwxr-xr-x   1 root  wheel       13 Sep 29 22:44 pam_self.so -> pam_self.so.5
-rwxrwxr-x   1 root  wheel     3984 Sep 29 22:44 pam_self.so.5
lrwxr-xr-x   1 root  wheel       12 Sep 29 22:44 pam_ssh.so -> pam_ssh.so.5
-rwxrwxr-x   1 root  wheel    10256 Sep 29 22:44 pam_ssh.so.5
lrwxr-xr-x   1 root  wheel       16 Sep 29 22:44 pam_tacplus.so -> pam_tacplus.s
```

and 

```
ftp# ls -la /usr/lib
lrwxr-xr-x  1 root  wheel  17 Nov  7 20:51 /usr/lib -> /basejail/usr/lib
```

and it doesn't help when I change privileges on host 
`chmod -R 775 /usr/jails/basejail/usr/lib/`

Doesn't work. 
Any ideas?


----------



## SirDice (Nov 8, 2011)

Did you set a securelevel(7)?


----------



## alex_PL (Nov 13, 2011)

Hello,
Thanks for the quick reply,
When I set my jail:


```
kern.securelevel=0
```

still not working  

```
ftp#  sysctl -a | grep securelevel
kern.securelevel: 0
security.jail.param.securelevel: 0
```

When install I have message

```
ftp# make install clean
===>  Installing for pam-pgsql-0.6.3_1
===>   pam-pgsql-0.6.3_1 depends on shared library: mhash.2 - found
===>   pam-pgsql-0.6.3_1 depends on shared library: pq.5 - found
===>   Generating temporary packing list
===>  Checking if security/pam-pgsql already installed
FreeBSD: Installing pam_pgsql.so to /usr/lib
install: chown 0:4294967295 /usr/lib: Read-only file system
install: chmod 755 /usr/lib: Read-only file system
install: /usr/lib/pam_pgsql.so: Read-only file system
*** Error code 71

Stop in /var/ports/basejail/usr/ports/security/pam-pgsql/work/pam-pgsql-0.6.3.
*** Error code 1

Stop in /basejail/usr/ports/security/pam-pgsql.
```
Help me please


----------



## orthanner (Jan 18, 2013)

Simply: you cannot do in within jail because /usr (or, actually, jails's root directory) is mounted read-only. The correct way is to install from the host system with [CMD=""]make PREFIX=/basejail install clean[/CMD]


----------

