PINE64
Password change - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112)
+--- Thread: Password change (/showthread.php?tid=8877)

Pages: 1 2


RE: Password change - Arwen - 01-22-2020

@martinayotte, yes, the actual encrypted data is in "/etc/shadow". But the question was for changing the plain text user name, which one method to fix is edittig "/etc/passwd".

Lots of people may not know, but the original encrypted passwords were in "/etc/passwd" when Unix was first written.

@FeMike, the forum search function is at the top of web page, in the black bar, third from the right.

Each forum seems to do things slightly different.


RE: Password change - martinayotte - 01-22-2020

(01-22-2020, 03:26 PM)Arwen Wrote: But the question was for changing the plain text user name, which one method to fix is edittig "/etc/passwd".

But if the user name is changed in /etc/passwd, it requires to be changed in /etc/shadow too, otherwise, it won't work ...


RE: Password change - Arwen - 01-22-2020

@martinayotte, agreed.

Except the original requester was not changing the "user name", but wanting to change the "full name". Here is the before and after of what @FeMike wanted;
Code:
newuser:x:1000:1000:rock,,,New User:/home/newuser:/bin/bash
newuser:x:1000:1000:New User,,,:/home/newuser:/bin/bash
This occured because the instructions I copied from a forum post, were in-correctly using "chfn -o" when it should have been "chfn -f".


RE: Password change - FeMike - 01-22-2020

(01-22-2020, 03:26 PM)Arwen Wrote: @martinayotte, yes, the actual encrypted data is in "/etc/shadow". But the question was for changing the plain text user name, which one method to fix is edittig "/etc/passwd".

Lots of people may not know, but the original encrypted passwords were in "/etc/passwd" when Unix was first written.

@FeMike, the forum search function is at the top of web page, in the black bar, third from the right.

Each forum seems to do things slightly different.

On my screen from mobile device there are two menus. One is the welcome back drop down and the other is private messages. That black bar? The pic is to large in size so here is a link.

https://photos.app.goo.gl/9k1abfi8MKtdgJ4x6


RE: Password change - Arwen - 01-22-2020

@FeMike, Sorry, I forgot about mobile users. The search button does not seem present for smaller screens. Lots of web sites still are not mobile friendly.

On a regular screen, (like your Pinebook Pro :-), it should show up where I said it was. Far to the right of the Welcome back & Private messages part.


RE: Password change - FeMike - 01-22-2020

(01-22-2020, 03:59 PM)Arwen Wrote: @FeMike, Sorry, I forgot about mobile users. The search button does not seem present for smaller screens. Lots of web sites still are not mobile friendly.

On a regular screen, (like your Pinebook Pro :-), it should show up where I said it was. Far to the right of the Welcome back & Private messages part.

Thank you again this has worked. Being we are in general forum and I'd hate to create a new thread would you mind if I ask an off topic question here or would you prefer me to create a new?


RE: Password change - Arwen - 01-23-2020

@FeMike, if it's related to password changes, here is fine.

If it's a new topic, create a new thread with appropriate title, (so others can see it easier too).


RE: Password change - dsk70 - 02-29-2020

(01-22-2020, 05:47 AM)FHieMike Wrote:
(01-21-2020, 11:33 PM)mainer Wrote:
(01-21-2020, 09:35 PM)RedHaoredOmen Wrote: the wiki page says the username change is "usermod -l NewUser -d /home/NewUser -m rock" but when I go into root I am unable to change anything "user rock is currently used by process 738 or invalid option -1      Undecided

You probably either logged out and then back in as root or used sudo to get root. Those both leave processes owned by "rock" and the command fails. The way I got around the problem was to reboot and log in as root (default password is root unless you have clanged it) to make the changes. That way user "rock" will not have any processes. I made all the user changes and root password at that login. 

I also noticed a glitch when rebooting. The Login Screen still lists "rock" as the user not the new name. This problem shows up in other applications as well. It is due to to a formatting error (after the changes) in the /etc/passwd file that is likely caused by the chfn command. Each line of /etc/passwd should look like:

user_name:x:1000:1000:chfn_name,,,:/home/user_name:/bin/bash

but the newly changed entry will look like:

user_name:x:1000:1000:rock,,,chfn_name:/home/user_name:/bin/bash

note the difference in the chfn (5th) field.

You can edit the file with the command:

Code:
sudo nano /etc/passwd

but be careful to only correct the bad field in that one line. Make a backup first.

Thank you for your answer, more in depth than mine. Also I'm glad you mentioned the glitch with the rock name still showing up. I've been trying to figure out why that is. I'll change the passwd file like you mentioned. Is copying the original file first and renaming it something else a suitable back up? Sorry if that sounds dumb as I'm still learning. Other places I noticed rock showing up is when I go into settings, personalize, the GUI that pops up shows where you can change avatar and on this screen it still shows rock. Is this part of the glitch you think?

Hi - so I am new to Linux as well, but making progress and trying to correct the same "rock" issue even though I successfully changed my username to dsk and created a unique password. For example, in terminal I can see dsk@Debian-Desktop but when I go into HexChat, I can see that it is referring to me as rock.

So once I run the aforementioned sudo nano /etc/passwd it takes me into GNU nano 2.7.4 File:  /etc/passwd   and the last line is where I see where I will likely need to edit. Here is what it looks like:

dsk:x:1000:1000:rock,,,:/home/dsk:/bin/bash

where rock exists above, do I simply delete rock leaving everything else intact; or do I need to replace rock with something (as I am completely new to the syntax)?

once any changes are made do I simply Exit at the bottom menu of GNU nano 2.7.4, or any additional keystrokes or menu-based selections required?

Thanks so much for your guidance!


RE: Password change - mainer - 03-01-2020

(02-29-2020, 10:56 PM)dsk70 Wrote:
(01-22-2020, 05:47 AM)FHieMike Wrote:
(01-21-2020, 11:33 PM)mainer Wrote:
(01-21-2020, 09:35 PM)RedHaoredOmen Wrote: the wiki page says the username change is "usermod -l NewUser -d /home/NewUser -m rock" but when I go into root I am unable to change anything "user rock is currently used by process 738 or invalid option -1      Undecided

You probably either logged out and then back in as root or used sudo to get root. Those both leave processes owned by "rock" and the command fails. The way I got around the problem was to reboot and log in as root (default password is root unless you have clanged it) to make the changes. That way user "rock" will not have any processes. I made all the user changes and root password at that login. 

I also noticed a glitch when rebooting. The Login Screen still lists "rock" as the user not the new name. This problem shows up in other applications as well. It is due to to a formatting error (after the changes) in the /etc/passwd file that is likely caused by the chfn command. Each line of /etc/passwd should look like:

user_name:x:1000:1000:chfn_name,,,:/home/user_name:/bin/bash

but the newly changed entry will look like:

user_name:x:1000:1000:rock,,,chfn_name:/home/user_name:/bin/bash

note the difference in the chfn (5th) field.

You can edit the file with the command:

Code:
sudo nano /etc/passwd

but be careful to only correct the bad field in that one line. Make a backup first.

Thank you for your answer, more in depth than mine. Also I'm glad you mentioned the glitch with the rock name still showing up. I've been trying to figure out why that is. I'll change the passwd file like you mentioned. Is copying the original file first and renaming it something else a suitable back up? Sorry if that sounds dumb as I'm still learning. Other places I noticed rock showing up is when I go into settings, personalize, the GUI that pops up shows where you can change avatar and on this screen it still shows rock. Is this part of the glitch you think?

Hi - so I am new to Linux as well, but making progress and trying to correct the same "rock" issue even though I successfully changed my username to dsk and created a unique password. For example, in terminal I can see dsk@Debian-Desktop but when I go into HexChat, I can see that it is referring to me as rock.

So once I run the aforementioned sudo nano /etc/passwd it takes me into GNU nano 2.7.4 File:  /etc/passwd   and the last line is where I see where I will likely need to edit. Here is what it looks like:

dsk:x:1000:1000:rock,,,:/home/dsk:/bin/bash

where rock exists above, do I simply delete rock leaving everything else intact; or do I need to replace rock with something (as I am completely new to the syntax)?

once any changes are made do I simply Exit at the bottom menu of GNU nano 2.7.4, or any additional keystrokes or menu-based selections required?

Thanks so much for your guidance!

@dsk70 You should change rock to dsk to get the desired result.