[solved] Change my username on cloned system

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: Change my username on cloned system

Post by Pepper-Mint-Patty »

hayden wrote: Mon Oct 19, 2020 2:12 pm Ok, re-add them. go to your /home/adler folder in the file browswer, click and drag the Documents, Desktop etc.. back over to the pane
Tried that, doesn't work.
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
hayden

Re: Change my username on cloned system

Post by hayden »

how did you remove them? right-click and remove?
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: Change my username on cloned system

Post by Pepper-Mint-Patty »

hayden wrote: Mon Oct 19, 2020 2:29 pm how did you remove them? right-click and remove?
Most likely.
And there is a folder called desktop in documents too... :(
Image
When logged in as fourth all the folders are there.
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
hayden

Re: Change my username on cloned system

Post by hayden »

lol. i have no idea what you did. sorry
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: Change my username on cloned system

Post by Pepper-Mint-Patty »

hayden wrote: Mon Oct 19, 2020 4:45 pm lol. i have no idea what you did. sorry
Likewise. :)
Will do one snapshot restore again, and restart the method. See how that will end.
I am getting quite a routine now. :wink:
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: Change my username on cloned system

Post by Pepper-Mint-Patty »

Code: Select all

https://i.ibb.co/RzpzYC7/junk-2.png
The orange triangles are linked to the old user! This has not been changed when changing the username. Dead links!
Downloads Music Videos Documents Pictures

These folders do exist for the new made user. Here is explained how to relink them
viewtopic.php?p=1630645&sid=6d57a09d4ef ... 9#p1630645

But why didn't this happen in the first place. And more importantly: will there be more (important) things not working ?
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
hayden

Re: Change my username on cloned system

Post by hayden »

I dont know. I tested it on my system and that did not happen. It went smooth with the renamed user. It must be something different you are doing.
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: Change my username on cloned system

Post by Pepper-Mint-Patty »

hayden wrote: Wed Oct 21, 2020 1:44 pm It must be something different you are doing.
The difference i notice from your example
viewtopic.php?p=1902151#p1902151

Code: Select all

test2:x:1004:1004:test2,,,:/home/test2:/bin/bash
I am having now temp@old and old@old

1-

Code: Select all

temp@old:/home$ sudo vim /etc/passwd
geoclue:x:121:127::/var/lib/geoclue:/usr/sbin/nologin
old:x:1000:1000:,,,:/home/old:/bin/bash
temp:x:1001:1001:Temp-DEL,,,:/home/temp:/bin/bash
when checking I have only 2x old. The one you called test2
The temp user does appear 3 times.

2- This sambashare should that be there?

Code: Select all

temp@old:/home$ sudo vim /etc/group 

geoclue:x:127:
old:x:1000:
sambashare:x:128:old
temp:x:1001:temp

3- Whenever I change the hostname it changes for both users. Isn’t that odd?
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
hayden

Re: Change my username on cloned system

Post by hayden »

when checking I have only 2x old. The one you called test2. The temp user does appear 3 times
I'm sorry, I don't understand what you are saying here.

This sambashare should that be there?
yeah that's unrelated
- Whenever I change the hostname it changes for both users. Isn’t that odd?
The hostname is never going to change for different users. The hostname is the name of the computer. It has nothing to do with usernames.
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: Change my username on cloned system

Post by Pepper-Mint-Patty »

hayden wrote: Wed Oct 21, 2020 5:14 pm
when checking I have only 2x old. The one you called test2. The temp user does appear 3 times
I'm sorry, I don't understand what you are saying here.
I think this is the problem i meet all the time. Try to explain.

When i do

Code: Select all

sudo vim /etc/passwd
and go down, it shows

Code: Select all

geoclue:x:121:127::/var/lib/geoclue:/usr/sbin/nologin
old:x:1000:1000:,,,:/home/old:/bin/bash
temp:x:1001:1001:Temp-DEL,,,:/home/temp:/bin/bash
oldx:1000:1000:,,,:/home/old:/bin/bash

So 2 times old
shouldn't this be?

oldx:1000:1000:old,,,:/home/old:/bin/bash
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
hayden

Re: Change my username on cloned system

Post by hayden »

If you gave a full name to a user it will display it there, if you did not then it will not. Let me show you examples:

- 1st Example:
I did not type a name in the "Full Name" field when it prompted, I just pressed enter. See where i cat the file and it does not show apple three times, only twice. If I would have type "apple" as the user's "Full Name" then the word apple would show you 3 times in that passwd line. It would show whatever Full Name you give it, not necessarily "apple", which I'll show that in 2nd Example.

Code: Select all

root@topaz:/home# adduser apple
Adding user `apple' ...
Adding new group `apple' (1004) ...
Adding new user `apple' (1004) with group `apple' ...
Creating home directory `/home/apple' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for apple
Enter the new value, or press ENTER for the default
	Full Name []: 
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
root@topaz:/home#
root@topaz:/home# cat /etc/passwd
apple:x:1004:1004:,,,:/home/apple:/bin/bash
- 2nd Example

Code: Select all

root@topaz:/home# adduser orange
Adding user `orange' ...
Adding new group `orange' (1005) ...
Adding new user `orange' (1005) with group `orange' ...
Creating home directory `/home/orange' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for orange
Enter the new value, or press ENTER for the default
	Full Name []: Orange Man
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
root@topaz:/home# cat /etc/passwd
orange:x:1005:1005:Orange Man,,,:/home/orange:/bin/bash
Does that make sense?
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: Change my username on cloned system

Post by Pepper-Mint-Patty »

hayden wrote: Wed Oct 21, 2020 5:57 pm Does that make sense?
Yeah i remember giving full name: Temp-DEL. Thanks for the explanation.
Still don't get it why it doesn't work. It looks so bloody simple yet everytime i end up with a mess...
Anyhow i have been fiddling around and made many corrections. I managed to get user and hostname how i like it and changed the menu links. :roll: :(

Could you please tell me the command for:
-to get root to make the new user?
-to get rid of my 2nd user that has admin rights?

And hayden thank you for keep trying to help me! :)
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
hayden

Re: Change my username on cloned system

Post by hayden »

Could you please tell me the command for:
-to get root to make the new user?
I already posted how to do this. Look up two posts above this one. See the adduser?
-to get rid of my 2nd user that has admin rights?
every time i hear someone say admin rights when referring to linux it makes me cringe. That's Windows terminology. lol.
anyway to delete a user:

Code: Select all

$ sudo killall -u username
$ sudo userdel -r username
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: Change my username on cloned system

Post by Pepper-Mint-Patty »

hayden wrote: Thu Oct 22, 2020 7:12 am
Could you please tell me the command for:
-to get root to make the new user?
I already posted how to do this. Look up two posts above this one. See the adduser?

Code: Select all

old@old:~$ adduser orange
adduser: Only root may add a user or group to the system.
i tried to get root by su an su -

Code: Select all

old@old:~$ su -
Password: 
su: Authentication failure
old@old:~$ su
Password: 
su: Authentication failure
for sudo the password does work, so i use the correct password.

Code: Select all

old@old:~$ cd /home && ls
old  lost+found  temp  timeshift
old@old:/home$ sudo vim /etc/passwd
old@old:/home$ 
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
hayden

Re: Change my username on cloned system

Post by hayden »

Yes that makes sense. When you are typing " su - " you are switching to the root user so you will have to type root's password to get to a root prompt. Using sudo is different. As I've already explained somewhere in this novel we're making that sudo is simply temporarily elevating your access by allowing you to run commands as the root user. This is what some Linux distributions, like Mint, are calling "admin" accounts.

If you want to use root account in Mint, you need to first change the root password.

Code: Select all

$ sudo passwd
type in the root password you want to use
then you can

Code: Select all

erik@topaz:~$ su -
Password: 
root@topaz:~#
Locked

Return to “Beginner Questions”