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ā¦
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.