LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   antiX / MX Linux (https://www.linuxquestions.org/questions/antix-mx-linux-127/)
-   -   Problem - Changing general user name via terminal as root possible? (https://www.linuxquestions.org/questions/antix-mx-linux-127/problem-changing-general-user-name-via-terminal-as-root-possible-4175729058/)

LinWinux 09-18-2023 07:02 AM

Problem - Changing general user name via terminal as root possible?
 
Hi everyone,

Ran into a bit of a problem with MX today. The default installation of MX via my personal image on any of my machines always has the same user name installed by default. That user has root and general privileges because it is intended for that user to be the only user on that particular computer.

So we're on vacation and I wanted to transfer some files from a downstairs computer with MX to an upstairs computer with MX by means of Dukto which I really like for local file transfers. But I hadn't previously thought about the fact that an issue might arise when attempting to transfer files between machines which had the same user name ... even though the IP number on each machine is obviously *NOT* the same. Because of this (same user names), Dukto did not want to cooperate.

No problem, open up MX Tools, go to the user Manager, then change user name of one user to another name in order to get Dukto to work by finally recognizing two different users. Nope, couldn't be done. Why? Because MX gave me an error message that I couldn't change the exiting user name while being logged into that account. Message requires logging out and then in again as a different user.
Okay, that makes sense.
So I log out and then in again as root into the system.
Totally different screen layout, options, etc. since the root user is ??? a different user.
Back to MX tools, change user name, select the desired user from the drop down menu ... nope, still no go.
Can't be logged in as root, have to log out and then back in as a different standard ??? user. Huh, say what ???

Okay, so now I'm getting frustrated. What's the point of having a root user (God account) if the root user isn't permitted to do anything and everything on the machine?

I don't want to create an entire new user account just for the sake of moving a few files back and forth. That seems a bit redundant to me. Is there some way of accomplishing the change of a user name via the terminal after being logged into the root account again? It would seem to me that a root user within a root account should be able to accomplish this .... Or alternatively is there an App which accomplishes the same thing that Dukto does, but instead of using the user names an app which uses the IP number on a machine instead?
Hmmm, perhaps filezilla on a local level?
Thanks for any assistance.

michaelk 09-18-2023 08:49 AM

I don't use dukto so I am not familiar with how it works but I don't know why you would need to change usernames.

From the command line there is sftp and rsync. Both use ssh as the underlying network protocol. sshfs is a fuse filesystem that lets you "mount" a remote filesystem using sftp as the underlying transfer protocol. Since fuse is a user tool you do not need to be root to mount via sshfs.

I more used to using the command line versus GUI tools and changing names is accomplished using usermod.

LinWinux 09-18-2023 09:49 AM

Thanks. What I'm trying to avoid is having to type individual long file names since we're talking about only a handful of files at a time, that I keep moving back & forth between desktops. So being able to simply drag & drop the files where they should go is just really practical as well as really fast.

LinWinux 09-18-2023 10:18 AM

Alright, PROBLEM SOLVED ... by simply adding an FTP session with FileZilla to each machine with the corresponding IP number. That accomplishes the same thing as Dukto by allowing me to transfer files back and forth from desktop to desktop. Really simple process too.
Within FileZilla: Add a new name for a remote location ...
Then enter the IP number of the remote machine user ...
Followed by adding the user name and pwd of remote machine ...
Vice versa on the second computer ...
And start transferring files.

The default start location is generally /home/user but you can change that and even save those changes within the advanced FileZilla settings. For me, each location from either machine defaults to the desktop now (/home/user/Desktop) which works best for me.
Cheers.

michaelk 09-18-2023 10:31 AM

It should default to sftp but great that it is working for you. While I use it on Windows I don't think about on linux since there are many other options.


All times are GMT -5. The time now is 07:27 AM.