I installed Manjaro 24 for a friend - he is not able to use the command line.
How can he change his own user name?
I found no dialog for that.
Thank you in advance.
I installed Manjaro 24 for a friend - he is not able to use the command line.
How can he change his own user name?
I found no dialog for that.
Thank you in advance.
If youâre talking about Linux usernames, then thatâs not really possible, even on the command line. Linux usernames are unique identifiers - theyâre not meant to be modified. The best way of accomplishing the same effect would be âcreate new user, move across files, delete old userâ
If youâre talking about the name displayed, then thatâs normally in the Users section of the settings. However, without knowing the desktop environment youâre using (Gnome, KDE, XFCE, etc) I canât give you any instructions on this.
He tagged the topic xfce. So on xfce - open the âstart menuâ, click right where where the username with a little generic human (or personal picture) is. Or type âMugshotâ or âAbout meâ
That is for the display name.
Renaming the profile IS possible, but is a convoluted procedure and can have a lot of side effects. I would not recommend it for a newbie. The login can be changed with usermod
but it will leave the home unrenamed, and some settings rely on that nameâŚ
This.
And donât forget to make the new user admin as well - or he will not be able to do updates ⌠or anything system related (including destroying it, of course )
It is possible, at least in the CLI, using usermod
and groupmod
. I did it once, successfully but there may have been more things to do afterwards which I canât remember as it was many years ago. Anyway if the userâs home dir or name is hardcoded in any scripts, config, etc, then they will need updating.
This is really just for information. I havenât tested this, use at your own risk. If you do try it then make sure youâve got a backup just in case.
# renames the user, can't remember if it creates a new UID or not
# creates a new home dir and moves the files over
usermod -d /home/newname -m -l newname oldname
# renames the group, AFAIK doesn't change GID
groupmod -n newname oldname
Indeed.
yes - there are quite some config files in:
~/.config
~/.ssh
~/.wine
and more
whose content will not automatically be taken care of
So:
even after the procedure, one needs to delete all that and basically start from scratch - taking /etc/skel as a starting point
much easier to just create a new user account âŚ
Or edit the files, which could be even more work.
Iâm not suggesting anyone does itâŚjust saying itâs possible.
It certainly will be - unless you are skilled in sed or awk
But perhaps I just donât know how to use the modern file managers search and replace capabilities.
I agree with others that creating a new user is the easy way.
Does Manjaro Xfce come with Manjaro Settings Manager
? You can use that to manage user accounts and the groups they belong to without doing anything in the terminal.
Yes, it does - as far as I know, every Manjaro edition comes with that.
I do not think it has renaming function. Either it needs another account to be able to modify the first one or it just does not have it. At least on a first glance here - src/modules/users ¡ master ¡ Applications / manjaro-settings-manager ¡ GitLab - but C++ is not my first or even second language, maybe i am overseeing it.
No I donât think it does, never tried. Sorry I didnât mean to imply that one could use it to change username.
@dmt Huh - thatâs not functionality I was aware of. Thatâs actually really useful to know - not for this question specifically, but for Arm-based distros which start from a preinstalled image with a default user.
Sorry, no GUI.
This partially depends on what is set up and what needs handling.
(wine
for example would require extra steps, or any special entries in the sudoers file)
I will give you the basics though. We will assume olduser
and newuser
for the names.
Either log out or start from a new boot.
DO NOT LOG IN
Drop to tty
using Ctrl+Alt+Fx (F3, F4, F5, etc)
Log in as another user or root
at the console.
usermod -d /home/newuser -m olduser
usermod -l newuser olduser
groupmod -n newuser olduser
Note there is still the possibility of some hardcoded paths and the like. Such as mentioned with wine.
You can try to check with some searches;
grep -r olduser /home/newuser/*
grep -r olduser /etc/*
PS.
If you would like this in interactive script form ⌠I could be persuaded
User account. UNIX systems are multi-user platforms, and every individual user in a UNIX system must have a valid account with associated privileges, be it of the generic least-privilege kind or of a specially tailored kind for system services.
Profiles are a staple of individual userland applications â such as browsers â for emulating multi-user functionality on a single-user operating system. They only offer personalized preferences, but they do not offer access control.
The NT-based iterations of Microsoft Windows refer to their user accounts as âprofilesâ because Microsoft Windows was originally not designed as a multi-user operating system â it initially wasnât even an actual operating system â and even though the NT-based versions of Microsoft Windows support multiple user accounts, these systems still arenât really intended to be used in that manner, given the origins of Microsoft Windows as a consumerist graphical user interface on top of a non-networked single-user operating system, i.e. MS-DOS.
Thank you very much! Right click in start menu does help (curious).
And Thank you to all others too!
System menu or application launcher menu. A start menu is something only Microsoft Windows has.
On occasion, Iâve heard it called a SometimesStartMenuâŚ