What am I doing:
- I built GNU emacs for my own use on the phone.
- I run emacs in daemon mode on the phone, so I connect to it anytime using emacsclient to continue working with regular files, start processes, etc.
When logging in from the terminal on the phone, I'm currently user 10157, everything works:
$ id
uid = 10157 (10157) gid = 10157 (10157) groups = 10157 (10157), 1015 (1015), 1023 (1023), 1028 (1028), 3003 (3003)
When I connect via ssh to the phone from a PC (I use DigiSSHd on the phone), it registers me as a regular user 10282, everything works:
$ id
uid = 10282 gid = 10282 groups = 1015 (1015), 1023 (1023), 1028 (1028), 3003 (3003)
Emacs works fine, etc. However, this way I cannot connect via emacsclient to the emacs process running under user 10157. This is desirable since I do not want to start two emacs processes, since I want to continue working with the files that I opened in emacs under user 10157.
Thus: $ su - 10157
Ok, I can run emacs, etc. However, I cannot access the network.
$ ping -c1 google.com You must have internet permissions to use ping. Aborting. $ id uid=10157(10157) gid=10157(10157) groups=10157(10157)
Thus, I am no longer in the 3003 group needed to access the Internet, among other groups.
Why is this group information deleted, and how can I fix it, so I can continue to access the network when su is like this user in ssh?
source share