[Resolved]Problems adding user n problems changing username

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
coopacaloo

[Resolved]Problems adding user n problems changing username

Post by coopacaloo »

I have problems adding user i LinuxMint.

From terminal I did this: sudo adduser username and then I made a password for new user: sudo passwd <username>

It all seemed fine but after reboot when I loggen into the new account I saw that awful .iceauthorithy issue. Seen that before in ubuntu and it was a pain.
So I hitting the reset button cause I didnt think to startx from F2 when the entire desktop was missing I logged into my other working account.
Deleted account using: sudo userdel -f username to remove also all the home/newuser.

Then I did it all over again and created new user. Same result. And deleted account once again.

Really all I need is to change the name of my account and then I could care less about missing .iceauthority.

What lead me to do a <adduser> was that I could not change my own username from terminal.


Code: Select all

sudo usermod -d /home/new_username -l new_username -m current_username
Well this failed cause I was allready logged into the system. As I am the only user of this pc I can not make changes from other accounts either cause those new accounts starts with errors.

Is there a smart way to change my own username? I mean as I can not do it from terminal can I manually make changes to one or more files?
And if so what files to change?

Normally I would not care much as I right now need to change username and cannot just install new all over I must get this to work somehow. Backupdrives are full and I have no cash for new drives before next month.

Pls tell me there is a smart way to change the username/log in name for the only user of a Linux mint system?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: Problems adding user and problems changing username

Post by DrHu »

In order to change a user name you would need an admin access account; that is available as the first user created during the installation, as a convenience to the user, rather than the otherwise standard way of providing a root account and a less than root user account (note the admin group account: your first user has a little less than root control of the system, as far as I know)
  • So this means if you wanted to rename your first created user account (the one that is part of the admin group), you would need to use another account with admin group access or a root account which you activate
about users(Ubuntu: Mint main (Gnome) style)
http://www.reallylinux.com/docs/usersubuntu.shtml
coopacaloo

Re: Problems adding user and problems changing username

Post by coopacaloo »

DrHu wrote:In order to change a user name you would need an admin access account; that is available as the first user created during the installation, as a convenience to the user, rather than the otherwise standard way of providing a root account and a less than root user account (note the admin group account: your first user has a little less than root control of the system, as far as I know)
  • So this means if you wanted to rename your first created user account (the one that is part of the admin group), you would need to use another account with admin group access or a root account which you activate

Ohh no. Not what I was hoping for.
I am sure during install I did make a root or admin account but I can not remember neither the username nor the password of that account.

I have added some files to usr/bin of this account, could I just copy those file to my usb drive add a new user account and drop them in via sudo mv?


Can't remember how I fixed that .iceautorithy issue once before but I do remember it was a dirty task.

If I just add new user, when desktop does not fire up on log in I could just start in safemode and start x via terminal or even not care at all about the graphic interface just do all what I need to do from terminal?

I need to add some files to new user account /usr/bin and then hit a perl file. All that should be possible to solve via terminal.
Think that will work or should I just turn off power and wait till I have new drives so I can do a backup and clean install?
coopacaloo

Re: Problems adding user and problems changing username

Post by coopacaloo »

Hey I did manage to log in as root :)
Turns out I was trying to log as admin rather then root. Using root as username it was all ok.

So can someone double check this line of commands to helo me ensure I do not make a critical error. As I said I have no backup........

Code: Select all

sudo usermod -d /home/new_username -l new_username -m current_username
Will this command executed from root account change my username?

What is the most safe way to solve this?

Try to add new user from root, then also from root copy my old home folder to new user, and the do the same for usr/bin?

I think the last one is less prone for errors, cause I do not change anything for my user account, just copy files. If something goes bad or I still get -ice issue I still have not lost any data.
coopacaloo

Re: Problems adding user and problems changing username

Post by coopacaloo »

Ok from root account I successfully managed to create new user.
The new user account is working fine now.

From root how can I now copy old_usernames home folder to new usernames home folder?

I also need to copy usr/bin if they are different from old user to new user.

What command to put in terminal for this cop to work?
coopacaloo

Re: Problems adding user and problems changing username

Post by coopacaloo »

Run into another problem.
The new account I created from within root account does not have sudo privileges.
Trying a sudo command returns; username is not in the sudoers file. This incident will be reported.


So how can I from root account make sure the new user account I created is in the sudoers file?


I tried to edit the file using; gedit /etc/sudoers but don't know what to change.

When I open the file in gedit I can see the only line not commented out# says: %sudo ALL=(ALL:ALL) ALL


Also the file states that to edit this one must use the visudo command as root.

What is visudo and how to use it?
coopacaloo

Re: Problems adding user and problems changing username

Post by coopacaloo »

Searching other forums I found this command;

Code: Select all

echo 'username ALL=(ALL) ALL' >> /etc/sudoers

Solved!
Locked

Return to “Other topics”