Renaming home folder - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114) +--- Thread: Renaming home folder (/showthread.php?tid=8777) |
Renaming home folder - inkslinger - 01-14-2020 After renaming the default user rock, I followed the instructions on the wiki to rename the home folder, using the following command in root terminal: Code: usermod -d /home/rock -m NewUser I get the message returned: Code: usermod: no changes How do I rename the default rock folder, so that my home folder name and user name match? I'm running the default Debian MATE OS. RE: Renaming home folder - evilbunny - 01-14-2020 (01-14-2020, 05:19 PM)inkslinger Wrote: After renaming the default user rock, I followed the instructions on the wiki to rename the home folder, using the following command in root terminal: What happens if you log into a console as root and then mv /home/rock /home/NEWUSERNAME and then edit passwd with the new path for the user? RE: Renaming home folder - inkslinger - 01-14-2020 (01-14-2020, 06:50 PM)evilbunny Wrote: What happens if you log into a console as root and then mv /home/rock /home/NEWUSERNAME and then edit passwd with the new path for the user? After running that command, I got no messages (did it work? I don't know). Doing passwd NEWUSERNAME after that behaved as normal. (01-14-2020, 08:17 PM)inkslinger Wrote:(01-14-2020, 06:50 PM)evilbunny Wrote: What happens if you log into a console as root and then mv /home/rock /home/NEWUSERNAME and then edit passwd with the new path for the user? Actually, now I can't log in to NEWUSER from the main login screen after rebooting. It just keeps reloading the login screen. So, uh, I guess that broke something. I can log in as NEWUSER in the terminal, but can't get into the account from the main login screen. RE: Renaming home folder - Arwen - 01-14-2020 @inkslinger, the Wiki instructions are these; Code: Rename the rock user to your prefered username (replace myself with whatever you like): It's fixable from the text console as user "root". But, we would need a bunch of information; Code: tail /etc/passwd /etc/shadow /etc/group With the above information we probably can help more. But then again, with the above information you will probably see what's wrong. RE: Renaming home folder - inkslinger - 01-14-2020 (01-14-2020, 09:22 PM)Arwen Wrote: @inkslinger, the Wiki instructions are these;There is a different spot in the wiki where it breaks the command into two different commands, which is what I was following at first. That may have been the issue. Code: tail /etc/passwd /etc/shadow /etc/group Here is the output. /etc/shadow was "access denied," so I don't know what's happening there. Hopefully, nothing I've pasted below is information I should have blanked out, since I mostly don't know what those outputs mean. adam@Debian-Desktop:~$ tail /etc/passwd /etc/shadow /etc/group ==> /etc/passwd <== systemd-resolve:x:102:104ystemd Resolver,,,:/run/systemd/resolve:/bin/false systemd-bus-proxy:x:103:105ystemd Bus Proxy,,,:/run/systemd:/bin/false _apt:x:104:65534::/nonexistent:/bin/false ntp:x:105:109::/home/ntp:/bin/false messagebus:x:106:110::/var/run/dbus:/bin/false avahi:x:107:112:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false sshd:x:108:65534::/run/sshd:/usr/sbin/nologin lightdm:x:109:113:Light Display Manager:/var/lib/lightdm:/bin/false pulse:x:110:114ulseAudio daemon,,,:/var/run/pulse:/bin/false adam:x:1000:1000:rock,,,,Adam Snider:/home/rock:/bin/bash tail: cannot open '/etc/shadow' for reading: Permission denied ==> /etc/group <== ntp:x:109: messagebus:x:110: ssh:x:111:adam avahi:x:112: rock:x:1000: lightdm:x:113: pulse:x:114: pulse-access:x:115: bluetooth:x:116: sambashare:x:117: adam@Debian-Desktop:~$ ls -la /home total 16 drwxr-xr-x 4 root root 4096 Jan 15 2020 . drwxr-xr-x 20 root root 4096 Jul 11 2019 .. drwx------ 4 root root 4096 Mar 12 2019 .Trash-0 drwxr-xr-x 25 adam rock 4096 Jan 15 2020 rock adam@Debian-Desktop:~$ ls -la /home/ RE: Renaming home folder - Arwen - 01-15-2020 Well, it looks like the rename of the group and home directory did not go through. Using "root" from a text console, you can use this to try and fix it. Code: groupmod -n adam rock But, I guarentee nothing :-). RE: Renaming home folder - ElektromAn - 01-15-2020 (01-14-2020, 09:37 PM)inkslinger Wrote: adam@Debian-Desktop:~$ tail /etc/passwd /etc/shadow /etc/group Please not the $ sign you are (mostly and not fouling yourself) a ordinary user here. tail and other things with /etc/shadow will not work here. Without looking in the wiki, I think sudo is missing here with the usermod command If you messed up the thing and can't login via login greeter use the magic keys CTRL-F1 and login as root or better as ordinary. Note if your $home does not exist, you can't login, so you must use root RE: Renaming home folder - inkslinger - 01-15-2020 (01-15-2020, 10:27 AM)ElektromAn Wrote:(01-14-2020, 09:37 PM)inkslinger Wrote: adam@Debian-Desktop:~$ tail /etc/passwd /etc/shadow /etc/group I've replaced the $home, by reversing the instructions given by evilbunny near the start of the thread, so that's not a problem. I was initially logged in as root when doing the usermod commands (the wiki doesn't mention sudo, but I think that's because it tells you to do it from a root terminal so sudo isn't needed). Anyway, I will go back in as root later today and try Arwen's suggestion. Hopefully, that will solve the issue. RE: Renaming home folder - ElektromAn - 01-15-2020 Yes if you are root sudo is not needed. RE: Renaming home folder - inkslinger - 01-15-2020 (01-15-2020, 09:06 AM)Arwen Wrote: Well, it looks like the rename of the group and home directory did not go through. This seemed to partly work, but the final command gave me the message: Code: ls: cannot access '/home/adam': No such file or directory And I'm now unable to login to user adam from the login screen. It just keeps taking me back to the login screen unless I log in as root. Time to just create a new user? OK, after doing: Code: -d /home/adam -m adam I was able to once again login as adam from the GUI login screen. Once in the account, a pop-up indicated: Configured directory for incoming files does not exist. Please make sure that directory "/home/rock" exists or configure it with blueman-services I ran blueman-services to attempt to change the incoming folder, but clicking on the dropdown is unresponsive. Hovering the cursor over the drop down shows the message: "Applet's transfer service plugin is disabled". Terminal gave the following readout: Code: adam@Debian-Desktop:~$ blueman-services |