Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - su: System error (?): (11 Items)
   
su: System error (?)  
I've been working with 7.1 on a BeagleBone Black with 7.1, which has been working well.  In the last week or so there 
was an update to the SSL libs (I think?) and I think with recent builds of the target image there seems to be a problem 
with authentication on this machine (a separate x86_64 rebuild seems fine).  I can still ssh into the machine using 
credentials I've place there, but if I try to telnet in as myself it fails.  I noticed the problem because I can no 
longer "su root" without getting a "System error".

If I connect the serial port, I do see the boot sequence as normal and am logged in as root there.

Are there changes to the passwd/authentication that I might have overlooked with a recent library update (or something 
else I may have missed)?

Thank you!

David
Re: su: System error (?)  
You might be being affected by a change to libpam. PAM requires that the chain of directories leading up to its config 
files and modules do not have group or world write access. It inexplicably omitted the root directory until recently.

Assuming this is the case, you need to add 'mntperms=755' as an option to the command you use for mounting your file 
system.
Re: su: System error (?)  
Thank you!  That seems to have fixed my problem.  (Not sure if this could have been in the release notes, I did look 
over but didn’t notice.)

I really appreciate your quick response.

-David

> On Dec 18, 2020, at 5:11 PM, Roger Maclean <community-noreply@qnx.com> wrote:
> 
> You might be being affected by a change to libpam. PAM requires that the chain of directories leading up to its config
 files and modules do not have group or world write access. It inexplicably omitted the root directory until recently.
> 
> Assuming this is the case, you need to add 'mntperms=755' as an option to the command you use for mounting your file 
system.
> 
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post121156
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com

Attachment: Text smime.p7s 1.57 KB
Re: su: System error (?)  
I am having a similar problem with the 7.1 RPi4 and Xilinx ZCU-102. Maybe a "senior's" moment"?

I need to add/change passwords but executing passwd results in the following message:

passwd: System error

On the RPi4 I added the "mntperms=755" to the SDMMC driver as per the use message:

devb-sdmmc-bcm2711 mem name=below1G sdio addr=0xfe340000,irq=158,bs=bmstr_base=0xc0000000 disk name=sd blk mntperms=755

But this has no effect. Nothing I try works.

use devb-sdmmc-bcm2711 indicates that io-blk (blk) options are supported. But a pidin shows no io-blk? The SDMMC driver 
details are missing from the RPi4 BSP User Guide and I can't find anything meaningful in the source to the SDMMC driver.


I tried manually making the paths to /etc/pam.d non-world or group write access (chmod 755) but this didn't work either.


I am using the default /etc/pam.d/[files].  libpam.so is present.

Am I missing something simple? If so, what?? :-)  This is driving me nuts...

Apart from this the SDMMC driver seems to work fine. On startup I execute the following mount command to point root '/' 
to a QNX6 partition on the SD card:

mount -t qnx6 /dev/sd0t177 /     and this seems to be OK.

Thanks,

Geoff.

> Thank you!  That seems to have fixed my problem.  (Not sure if this could have
>  been in the release notes, I did look over but didn’t notice.)
> 
> I really appreciate your quick response.
> 
> -David
> 
> > On Dec 18, 2020, at 5:11 PM, Roger Maclean <community-noreply@qnx.com> wrote:
> > 
> > You might be being affected by a change to libpam. PAM requires that the 
> chain of directories leading up to its config files and modules do not have 
> group or world write access. It inexplicably omitted the root directory until 
> recently.
> > 
> > Assuming this is the case, you need to add 'mntperms=755' as an option to 
> the command you use for mounting your file system.
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 
> > OSTech
> > http://community.qnx.com/sf/go/post121156
> > To cancel your subscription to this discussion, please e-mail ostech-core_os
> -unsubscribe@community.qnx.com
> 


Re: su: System error (?)  
I may not have followed up, but my problem was traced to permissions on a subdirectory I think I had created on the disk
 being mounted (maybe /usr/lib?). In any case, I did find it, adjusted (maybe I had the wrong owner?) and it fixed the 
login issues. It would be great if the source of the problem were logged somewhere so it would be easier to fix!

> On Apr 4, 2021, at 11:47 PM, Geoff Roberts(deleted) <community-noreply@qnx.com> wrote:
> 
> I am having a similar problem with the 7.1 RPi4 and Xilinx ZCU-102. Maybe a "senior's" moment"?
> 
> I need to add/change passwords but executing passwd results in the following message:
> 
> passwd: System error
> 
> On the RPi4 I added the "mntperms=755" to the SDMMC driver as per the use message:
> 
> devb-sdmmc-bcm2711 mem name=below1G sdio addr=0xfe340000,irq=158,bs=bmstr_base=0xc0000000 disk name=sd blk mntperms=
755
> 
> But this has no effect. Nothing I try works.
> 
> use devb-sdmmc-bcm2711 indicates that io-blk (blk) options are supported. But a pidin shows no io-blk? The SDMMC 
driver details are missing from the RPi4 BSP User Guide and I can't find anything meaningful in the source to the SDMMC 
driver.
> 
> I tried manually making the paths to /etc/pam.d non-world or group write access (chmod 755) but this didn't work 
either.
> 
> I am using the default /etc/pam.d/[files].  libpam.so is present.
> 
> Am I missing something simple? If so, what?? :-)  This is driving me nuts...
> 
> Apart from this the SDMMC driver seems to work fine. On startup I execute the following mount command to point root '/
' to a QNX6 partition on the SD card:
> 
> mount -t qnx6 /dev/sd0t177 /     and this seems to be OK.
> 
> Thanks,
> 
> Geoff.
> 
>> Thank you!  That seems to have fixed my problem.  (Not sure if this could have
>> been in the release notes, I did look over but didn’t notice.)
>> 
>> I really appreciate your quick response.
>> 
>> -David
>> 
>>>> On Dec 18, 2020, at 5:11 PM, Roger Maclean <community-noreply@qnx.com> wrote:
>>> 
>>> You might be being affected by a change to libpam. PAM requires that the 
>> chain of directories leading up to its config files and modules do not have 
>> group or world write access. It inexplicably omitted the root directory until 
>> recently.
>>> 
>>> Assuming this is the case, you need to add 'mntperms=755' as an option to 
>> the command you use for mounting your file system.
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> 
>>> OSTech
>>> http://community.qnx.com/sf/go/post121156
>>> To cancel your subscription to this discussion, please e-mail ostech-core_os
>> -unsubscribe@community.qnx.com
>> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post121363
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Re: su: System error (?)  
I have a similar error. Setting mntperms=755 doesn't seem to solve this. Also, it happens even if I switch from root to 
an user in the user's home-directory. Permissions for the folder seems to be correct, too (everyone has read-access to 
it anyway).
Still think it is due to the configuration we made to the system. Is there a way to get more information what exactly 
causes the error?
P.S.: In case this helps, I once go the response: who are you?
Re: su: System error (?)  
We found out the /usr also must have permissions 0755. Maybe this helps. /usr/lib may also be affected, but we did not 
explicitly test this.

And I am not sure if -omntperns=0755 must be specified with the leading "0".

Regards,
Albrecht
Re: su: System error (?)  
PAM is very, very finicky. The documentation provides a troubleshooting guide, though. Make sure you follow it:

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.security.system/topic/manual/pam.html

--Elad
Re: su: System error (?)  
It is fairly finicky though the rules are fairly straightforward. All config files and dlls used by PAM must be owned by
 root and not be group/writable writable. This must also be true of the directory these are contained in, their parent 
directory etc down to the root.

You might be able to get more information by running slog2info after running into a problem. You might be able to get 
even more by setting the environment variable OPENPAM_DEBUG (to anything) and then looking in slog2 (the environment 
variable has to be set for the process that is trying to use PAM, e.g. su). I don't know when these things were added so
 they may or may not work for you.
Re: su: System error (?)  
And that su is has the user setuid bit.

--Elad
Re: su: System error (?)  
The thing I learnt hardly is that we have to satisfy 
ls -ld / to be root:root with permission 755(no write for group and others).

In our BSP sample build file, we did not explicitly set dperms=0755 to root directory(/) as we do to others, for example
:
[uid=0 gid=0 type=dir dperms=0755] /usr
[uid=0 gid=0 type=dir dperms=0755] /usr/lib
[uid=0 gid=0 type=dir dperms=0755] /etc

On my target, I mount disk drive to / as follows:
mount -t qnx6 /dev/sata0t179 /
and that break the rule for /
Once change the mounting with -o mntperms=755, the su - root works.
mount -t qnx6 -o mntperms=755 /dev/sata0t179 /