The extra / is irrelevant. Consecutive / are collapsed into a single one with no error message and no problem. For instance:
$ pwd
/home/terdon
$ cd ///////////////etc
$ pwd
/etc
$ cd //////usr/////local//////bin
$ pwd
/usr/local/bin
Now, the -P option of adduser is:
-P, --prefix PREFIX_DIR
Apply changes to configuration files under the root filesystem found under
the directory PREFIX_DIR. This option does not chroot and is intended for
preparing a cross-compilation target. Some limitations: NIS and LDAP
users/groups are not verified. PAM authentication is using the host files. No
SELINUX support.
But the -R option is:
-R, --root CHROOT_DIR
Apply changes in the CHROOT_DIR directory and use the configuration files
from the CHROOT_DIR directory. Only absolute paths are supported.
I suspect that it doesn't make sense to use both of them, they basically do the same thing in a different way. I don't know the details here, and I may be wrong, but based on your output, it looks like the -P is overwriting the -R. Very probably, both options set the same variable in adduser's code, and the one you gave last overwrites the previous one.
Presumably, you have a valid chroot environment set up under /home/user/fakeroot, but because of the -P /home/user/Desktop you aren't using it and adduser is looking for /home/user/Desktop/etc instead of /home/user/fakeroot/etc.
I think you only want to use one of those two options and not both. If you explain what you are really trying to achieve, what the end result you're looking for is, we might be able to help more.
-Rdoes achroot()(for whatever reason), I suppose it might be possible that-Pwould just work after it. I.e.useradd -R /foo -P /barwould make changes in (the global)/foo/bar/etc/passwd. But I'm really just guessing, and the combination would likely be of a rather niche use. – ilkkachu Apr 17 '23 at 19:31-Rand-Pwork in the same way, possiblhy setting the same variable in the code so that one overwrites the other. – terdon Apr 18 '23 at 09:59