Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Changed user name after install

User avatar
towwire
Forum Regular
Forum Regular
Posts: 560
Joined: Fri Oct 15, 2010 12:15 pm

Changed user name after install

#1

Post by towwire » Sat Feb 09, 2019 6:04 pm

I created 2 partitions for a new install using the January snapshot. When I created the user I wanted to make sure that I did not forget which system I was using. So instead of using 'towwire' I used towwire2'. After, with the new desktop picture I new I should have stayed with 'towwire'. So here are the steps I did. Did I forget anything?

Login as root and open a terminal.

Code: Select all

Even though 'towwire2' should not have anything running I
root@mx:~# pkill -u towwire2 pid
root@mx:~# pkill -9 -u towwire2
Then change user to 'towwire' from 'towwire2'
root@mx:~# usermod -l towwire towwire2
usermod: warning: /var/mail/towwire2 not owned by towwire2
I think the above is because I'm root
Then to change Home to 'towwire'
root@mx:~# usermod -d /home/towwire -m towwire
root@mx:~# id towwire
uid=1000(towwire) gid=1000(towwire) groups=1000(towwire),7(lp),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),100(users),108(netdev),114(vboxsf),116(lpadmin),119(scanner)
root@mx:~# grep 'towwire' /etc/group
lp:x:7:towwire
dialout:x:20:towwire
cdrom:x:24:towwire
floppy:x:25:towwire
sudo:x:27:towwire
audio:x:29:pulse,towwire
dip:x:30:towwire
video:x:44:towwire
plugdev:x:46:towwire
users:x:100:towwire
netdev:x:108:towwire
vboxsf:x:114:towwire
lpadmin:x:116:towwire
scanner:x:119:saned,towwire
towwire:x:1000:
root@mx:~# 
So I logout and back in as 'towwire'. The question is did I forget anything? Every thing seemed to work except for this error when I did an update.

Code: Select all

Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.19.0-1-amd64
W: Possible missing firmware /lib/firmware/amdgpu/vega20_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_smc.bin for module amdgpu

full upgrade complete (or was canceled)

this terminal window can now be closed (press any key to close)
Sorry I did not copy what was above the error.
Here is the inxi.

Code: Select all

towwire@mx:~
$ inxi -F
System:    Host: mx Kernel: 4.19.0-1-amd64 x86_64 bits: 64 Desktop: Xfce 4.12.3 
           Distro: MX-18_x64 Continuum Dec 20  2018 
Machine:   Type: Desktop System: Gigabyte product: N/A v: N/A serial: <root required> 
           Mobo: Gigabyte model: F2A88X-UP4 v: x.x serial: <root required> 
           UEFI: American Megatrends v: F8a date: 12/14/2015 
CPU:       Topology: Quad Core model: AMD A10-7850K Radeon R7 12 Compute Cores 4C+8G bits: 64 
           type: MCP L2 cache: 2048 KiB 
           Speed: 1697 MHz min/max: 1700/3700 MHz Core speeds (MHz): 1: 1697 2: 1696 3: 1696 
           4: 1695 
Graphics:  Device-1: AMD Kaveri [Radeon R7 Graphics] driver: radeon v: kernel 
           Display: x11 server: X.Org 1.19.2 driver: ati,radeon unloaded: fbdev,modesetting,vesa 
           resolution: 1920x1200~60Hz 
           OpenGL: renderer: AMD KAVERI (DRM 2.50.0 4.19.0-1-amd64 LLVM 7.0.0) 
           v: 4.5 Mesa 18.2.6 
Audio:     Device-1: AMD Kaveri HDMI/DP Audio driver: snd_hda_intel 
           Device-2: AMD FCH Azalia driver: snd_hda_intel 
           Sound Server: ALSA v: k4.19.0-1-amd64 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: 74:d4:35:57:f2:98 
Drives:    Local Storage: total: 2.73 TiB used: 13.44 GiB (0.5%) 
           ID-1: /dev/sda vendor: Seagate model: ST2000DM001-1CH164 size: 1.82 TiB 
           ID-2: /dev/sdb vendor: Seagate model: ST1000DM003-1ER162 size: 931.51 GiB 
Partition: ID-1: / size: 14.70 GiB used: 5.63 GiB (38.3%) fs: ext4 dev: /dev/sda9 
           ID-2: /home size: 19.56 GiB used: 7.81 GiB (39.9%) fs: ext4 dev: /dev/sda10 
Sensors:   System Temperatures: cpu: 2.2 C mobo: N/A gpu: radeon temp: 4 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 186 Uptime: 54m Memory: 30.38 GiB used: 580.4 MiB (1.9%) Shell: bash 
           inxi: 3.0.29 
towwire@mx:~

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4586
Joined: Wed Apr 11, 2018 5:09 pm

Re: Changed user name after install

#2

Post by fehlix » Sat Feb 09, 2019 6:17 pm

towwire wrote:
Sat Feb 09, 2019 6:04 pm
I created 2 partitions for a new install using the January snapshot. When I created the user I wanted to make sure that I did not forget which system I was using. So instead of using 'towwire' I used towwire2'. After, with the new desktop picture I new I should have stayed with 'towwire'. So here are the steps I did. Did I forget anything?
Probably yes.
Changing username after installation is risky (ina sense not working user environment) and not recommended.
You can achieve it in 2-3 simple steps:
- create new temp-user ( this will get user-id 1001, gid 1001)
- login as temp-user
- remove old-user
- create new-user again with desired username ( MX Tools -> MX User manager)
If you desire is to get back user-id/grup-id 1000 for the new-user
Check if new-user's uid, group-id ( if this is now 1002)
- replace all 1002 in /etc/passwd and /etc/group with original 1000
and change ownership of /home/new-user to 1000:1000 recursively.
Login as new-user and if all work remove temp-user
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
towwire
Forum Regular
Forum Regular
Posts: 560
Joined: Fri Oct 15, 2010 12:15 pm

Re: Changed user name after install

#3

Post by towwire » Sat Feb 09, 2019 6:35 pm

This is just a test setup since I could not get a program to build on my main side. I did search and it said this could be done so I tried it. I may just wait till the February snapshot and reinstall. This is to learn to build programs etc.

User avatar
penguin
Forum Regular
Forum Regular
Posts: 375
Joined: Wed Jan 04, 2017 3:15 pm

Re: Changed user name after install

#4

Post by penguin » Sat Feb 09, 2019 7:28 pm

Some times ago I goggled and arrived to change user name(my self) successfully in MX Linux and Sparky Linux.I confirm that everything has gone perfect and runs fine.

Have a look here

Code: Select all

https://askubuntu.com/questions/34074/how-do-i-change-my-username
but check also some articles similar to this on internet as follow :

Code: Select all

https://www.google.no/search?client=opera&biw=1205&bih=609&ei=0mJfXP6cLsjN6ATikbPYCQ&q=linux+change+user+name&oq=linux+change+user+name&gs_l=psy-ab.3..0i7i30j0i7i10i30l3j0j0i30l2j0i5i30j0i5i10i30j0i5i30.2141.3161..5408...0.0..0.202.805.2j3j1......0....1..gws-wiz.......0i13j0i7i30i19j0i7i10i30i19j0i7i5i30i19j0i7i5i10i30i19j0i8i7i30i19.flzvoHX_3EM

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4586
Joined: Wed Apr 11, 2018 5:09 pm

Re: Changed user name after install

#5

Post by fehlix » Sat Feb 09, 2019 8:20 pm

penguin wrote:
Sat Feb 09, 2019 7:28 pm
Some times ago I goggled and arrived to change user name(my self) successfully in MX Linux and Sparky Linux.I confirm that everything has gone perfect and runs fine.
Thanks, for posting that link. Yes, you can fix and change user-id, group-id, onwership etc and change permissions this way
or similar as I wrote above. Nevertheless one main issue remains. If the user has already installed applications,
those will certainly also have placed it's app-settings somewhere within the users-home directory. And in most cases,
those settings do have the username and user-home directory "hard-coded" within those settings.
And it is not a simple task to find and adjust all these settings, as some are stored in "binary" like files, which you cannot simply edit. What I do sometimes if I really need to do this, is to keep a symlink-link within home with the older username pointing to the new home of the new user. By this I can make sure at least that any application still is working ... but that's a hack :eek:
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
towwire
Forum Regular
Forum Regular
Posts: 560
Joined: Fri Oct 15, 2010 12:15 pm

Re: Changed user name after install

#6

Post by towwire » Sat Feb 09, 2019 9:16 pm

fehlix wrote:
Sat Feb 09, 2019 8:20 pm
penguin wrote:
Sat Feb 09, 2019 7:28 pm
Some times ago I goggled and arrived to change user name(my self) successfully in MX Linux and Sparky Linux.I confirm that everything has gone perfect and runs fine.
Thanks, for posting that link. Yes, you can fix and change user-id, group-id, onwership etc and change permissions this way
or similar as I wrote above. Nevertheless one main issue remains. If the user has already installed applications,
those will certainly also have placed it's app-settings somewhere within the users-home directory. And in most cases,
those settings do have the username and user-home directory "hard-coded" within those settings.
And it is not a simple task to find and adjust all these settings, as some are stored in "binary" like files, which you cannot simply edit. What I do sometimes if I really need to do this, is to keep a symlink-link within home with the older username pointing to the new home of the new user. By this I can make sure at least that any application still is working ... but that's a hack :eek:
:puppy:
I did the searches and followed one to do the name change etc. But before that I did updates and the only programs I installed were Pale Moon with the extensions I use and SMplayer. I then installed what I need to do the builds for MakeMKV and CCextractor since I could not build them on my regular system. They ran find after the name change, I did have to edit Makemkv settings.conf file to change the path to ccextractor since it's not install system wide, that's it. The error was after name change, I checked for updates and did them. That happen this morning.

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4586
Joined: Wed Apr 11, 2018 5:09 pm

Re: Changed user name after install

#7

Post by fehlix » Sat Feb 09, 2019 9:46 pm

towwire wrote:
Sat Feb 09, 2019 9:16 pm
The error was after name change, I checked for updates and did them. That happen this morning.
Thanks, actually the firmware messages above are "W"-warnings, have probably nothing to do whith your user change actions. And as often such warnings can be regarded as "info" - to be ignored.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
figueroa
Forum Regular
Forum Regular
Posts: 396
Joined: Fri Dec 21, 2018 12:20 am

Re: Changed user name after install

#8

Post by figueroa » Sun Feb 10, 2019 12:10 am

As a system admin I do sometimes run into the need to change a user's username, uid or gid, but it's not always as straight forward as documented, and over the years has probably become more prone to file ownership problems. I like fehlix's approach. it seems messy, but it's a highly reliable few steps to take.
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

nour
Forum Novice
Forum  Novice
Posts: 5
Joined: Wed Jan 23, 2019 4:18 am

Re: Changed user name after install

#9

Post by nour » Wed Feb 20, 2019 1:49 pm

towwire wrote:
Sat Feb 09, 2019 6:04 pm

Code: Select all

Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.19.0-1-amd64
W: Possible missing firmware /lib/firmware/amdgpu/vega20_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_smc.bin for module amdgpu

full upgrade complete (or was canceled)
this terminal window can now be closed (press any key to close)
What about this error now Tutuapp 9apps Showbox ?
As I understand, kernel and system components are independant from all users so creating or deleting a user should not make a difference for the system components, but here we see that it can't find some og GPU modues if I'm not mistaken.
Last edited by nour on Fri Feb 22, 2019 6:12 pm, edited 2 times in total.

User avatar
dolphin_oracle
Forum Veteran
Forum Veteran
Posts: 12152
Joined: Sun Dec 16, 2007 1:17 pm

Re: Changed user name after install

#10

Post by dolphin_oracle » Wed Feb 20, 2019 2:07 pm

the kernel includes drivers for amd parts that haven't been brought into the firmware package yet. I don't think they are available yet.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad T530 - MX-18.3
lenovo s21e - antiX-19 beta 2 (live-USB)
FYI: mx "test" repo is not the same thing as debian testing repo.

Post Reply

Return to “Software / Configuration”