How to switch from defaultuser to nemo

But seriously, ever think what would happen if EVERYTHING was always root?

Worked on DOS just fine

1 Like

My kaypro, my vic20, my coco, my apple 2s. etc. None of them where networked. I also lived in northern alberta. only 3 geeks and a lot of red necks. so. yeah. security was not an issue. But having ONCE, in thrity years - because of a lowered guard - been nailed by ‘DRIVE BY’, really hurt. Job thing.

DOS? I’m a CP/M person. I hacked Wordstar to write poetry. I’m not sure what, if anything worked fine on DOS, but that’s because I never used it.

SORRY, now I’m being a sentimental egotist.
My point was that I believe it’s IN YOUR interest if my software is in a sandbox.

2 Likes

Maybe we can move this to another topic, but what exactly do you expect your phone to get DRIVE’d BY? If someone has access to nemo they can get root easily (got openrepos? tide-root will give you root with not even your devel-su password, maybe tap on Yes at the top of the screen), it’s a leftover from workstations which makes little sense, you can damage your files as nemo well enough if that is the concern

That was a tangent. What I am referring to is things like apps, including my own, not doing input sanitation and perhaps opening a door …

I do this with every device. Defaultuser is just too long. It’s the uid that does all the work so it’s quite trivial. It’s something like:

  • Move /home/defaultuser to /home/nemo
  • Symlink that back to make sure both are valid for a bit.
  • Use vipw to switch the name in the passwd and shadow files. The shadow files won’t let you edit them even as root, so you have to switch the permissions temporarily while you do it. Use chmod u+w /etc/shadow and /etc/gshadow beforehand, and u-w to switch them back after.
  • Use vigr to rename the group, and switch all the usernames in each group for both the group and gshadow. Search and replace with :%s/defaultuser/nemo/g

But I always forget at least one step every time, and then the device doesn’t boot and I have to reflash it. Second time is usually a charm though.

10 Likes

I think they should change the preset username with every release to a different Nightwish single-worded title. First Nemo, next release Wishmaster, then Sahara and going on like that :wink:

5 Likes

Correct. And now, in honor of @slava and wordle, a poem, koan and the next usernames:

Blind
Nonce.
Angle
snake.
knave.

It goes on.

2 Likes

Thanks a lot for that, I’ll try that, combined with the recovery boot method @attah suggested above.

Well, OpenWRT has been doing that for ages.

Then again a router is slightly different beast than a phone.

1 Like

Um, maybe. I haven’t looked at openwrt for a while, but I doubt that web server running on it does more than ‘start’ as root?

To be honest I haven’t either for a while, but back then there was only root on the device, no users.

1 Like

socat is your friend.

Thank you, seems that this did the trick! Phone booted and Terminal app says nemo.

4 Likes

Confirmed, the user account is not pre-existing in the install image, but created at (first?) boot if not existing.
The other reference is in the connman vpn config file.

Now I have to repackage my modified image and try flashing.

Does img2simg require any special options?

Apparently not: SUCCESS!

3 Likes

The default username is certainly a bit long and boring, ngl, but it doesn’t bother me that much. Neat trick to do it post-install, still!

If only the flashed device would ask the user for an username…

1 Like

I’m very happy this was possible.

I did it pre-install/flashing in the image, which is a bit involved but basically does allow selecting your name of choice.
I didn’t dare to make it elop just yet though…

Extra steps not mentioned in the original post:

  • /var/lib/lxc/aliendalvik/bsp_config

I think that’s generated. I didn’t need to change that anyway.

Does anyone have the list of exact commands to type out? Just in case I screw up the symlink I want to be sure I type in everything correctly.

Also do I have to be logged into my phone via ssh? Or can I do this all from SFOS Terminal?