You are not logged in.

#1 2024-03-28 07:55

sub13
Member
Registered: 2021-05-20
Posts: 53

Change user name

Bonjour,
Est'il possible de changer le nom utilisateur ?
Merci
-----------------
Hello
Is it possible to change user name ?
Thank you


Asus Eee PC 1000H Atom N270 à 1.6 GHz ram 2go avec Q4os 3.16.1 centaurus

Offline

#2 2024-03-28 10:26

seb3773
Member
Registered: 2023-11-01
Posts: 74

Re: Change user name

It's possible, but not a trivial task. You need first to create another temporary user, with root privileges, and you will do the changes from this account:
sudo usermod -l newname oldname
sudo groupmod -n newname oldname
sudo usermod -d /home/newname -m oldname

I never tried it, and I'm not so sure about the last command (to move old home folder to new location), so if someone can confirm it ?
---------------------
C'est possible, mais ce n'est pas une tâche triviale.Tu dois d'abord créer un autre utilisateur temporaire, avec les privilèges root, et effectuer les modifications à partir de ce compte:

sudo usermod -l nouveau nom ancien nom
sudo groupmod -n nouveau nom ancien nom
sudo usermod -d /home/nouveau nom -m ancien nom

Je ne l'ai jamais essayé et je ne suis pas sûr de la dernière commande (pour déplacer l'ancien dossier personnel vers un nouvel emplacement), donc si quelqu'un peut le confirmer ?


My Q4OS scripts: win10 theming, perfs optimisation, laptop configuration, ...  for trinity users -->  https://github.com/seb3773/q4osXpack

Offline

#3 2024-03-28 13:36

sub13
Member
Registered: 2021-05-20
Posts: 53

Re: Change user name

Ok merci trop compliqué cela restera comme ça.
Bonne journée
--------
Ok thank you too complicated it will stay like that.
Have a good day


Asus Eee PC 1000H Atom N270 à 1.6 GHz ram 2go avec Q4os 3.16.1 centaurus

Offline

#4 2024-03-28 15:48

seb3773
Member
Registered: 2023-11-01
Posts: 74

Re: Change user name

I understand. Although this is easier than on windows, where changing username implies changing a lots of other things, in registry etc... it's not "user friendly" to do that. Maybe someone knows a simpler way to do it ?

Last edited by seb3773 (2024-03-28 15:48)


My Q4OS scripts: win10 theming, perfs optimisation, laptop configuration, ...  for trinity users -->  https://github.com/seb3773/q4osXpack

Offline

Board footer

Powered by FluxBB