How to change username

that is actuallyw rong way - more cosher would be groupmod -a newuser sudo
you don’t have to have dedicated entry in sudoers file

That is what I did, I didn’t update /etc/sudoers directly for that. Updated my post above.

1 Like

The only other thing that I would add to that is … rename /media/purism

It may well work without doing that but it is untidy at a minimum.

1 Like

How can you edit the kernel boot parameters on the Librem 5?

flash-kernel is the program managing them.

That will actually edit the username, correct?

But what if I wanted to create a new user from scratch and use it as the main user, and eradicate the original one? The log in screen on boot does not seem to be allowing to choose who is logging in.

1 Like

I think so. Rename. But without fixing the home directory and anything else similar that might depend on it - and I read previously that this will break things because purism is hard-coded somewhere, so that is to be included within the “anything else”.

If done comprehensively, how would that differ? (Theoretically, doing it your way, the “main user” would end up with a different uid but would that matter to you?)

From past experience (not on the Librem 5), renaming the existing account and keeping the uid/gid the same is less hassle.

It’s just nice to have, I could certainly bear without it. This inflexibility simply doesn’t sit well with the whole philosophy of Purism — whilst positioning PureOS as all-sorts-free Linux bla-bla-bla, it effectively forces the phone user to be a certain one, even renaming the username of which isn’t trivial.

Also, I don’t really get why would the username/ID be hardcoded anywhere in the system in the first place. Smells like bad design practice, blatant violation of the loose coupling principle.

Well, OK. You can do that too. But AFAIK there is no documentation (for either procedure) so you would be on your own dealing with the break / fix.

I imagine that this is a deliberate design decision - to give a user experience that is more similar to what people are used to on smartphones. I expect also that with even more effort you could reinstate the standard Linux desktop GUI login screen. That’s the real Linux philosophy, right? You’ve got the source. You own the system. Make it the way you want it.

Personally I don’t like it from a security perspective. It gives an attacker a known username to target. (Is that really a problem today for most users? Probably not because too few Librem 5 phones are in circulation, but we can hope that one day …)

In an ideal world, on first boot after install, it would ask for the desired “main” username, create it and configure to use it - so you would never have to rename the default username in order to get your desired username. (This is basically what happens with some desktop Linuxes.)




is this executed as a script? can this be done while being logged into the purism user account?

@guido.gunther, can “Change User Name” option be added to the Mobile Settings" application?

Also, “Get IP Address” would be helpful as well for ssh purposes.

1 Like

Via Terminal:
hostname -I will get you the host IP address

I did this over ssh when I hacked that up 2d ago, you can do it from the logged in system via screen but I’d rather not do that As long as you have ssh access you can easily recover.

1 Like

See also the apt install whatip.

If you are at home then it may be easier just to configure so that the phone always has the same LAN IP address.

If you are not at home then getting your IP address may not be very helpful as you may be behind CGNAT.

Got it, but change user name should definitely make it to the list.

Adding one update to this thread as I saw a comment from @joao.azevedo in another thread:

I haven’t played with the VM I mentioned in the older posts here.
Aside from the bm818-tools expecting username “purism” has anyone else found any side-effects from changing the default username?

I’d still really like to rename the hostname (seems safe) and the default username (seems mostly safe?) once I get my L5.

1 Like

That will be fixed with the next release via this merge request:

The issue was caused by this:


I’ve been using a non-default hostname without problems for a long time.

I also would like to be able to have a custom username, preferable no purism username at all, but I did not try changing the username yet.