0

I'm on a NAS and had been running some YAMLs. I have a user ID johnG(1042) G(100) which was used for the YAML. There were some updates along, and I'm not sure how it happened but suddenly it changed to abc(1042) G(100). Now both names exist with the same ID and Group. I did not make the change knowingly and no one else has access to the NAS. Everything seems to be running, but I don't want to wait until there is an issue. How do I get rid of that second name to the same id?

2
  • 2
    what does "running some YAMLs" mean? YAML is just a generic format for data. Commented Aug 21, 2024 at 15:46
  • I'm tentatively assuming Ansible. Commented Aug 21, 2024 at 16:13

1 Answer 1

1

Not a great deal to go on in your question, but using experience to fill in some gaps, it sounds like you have a couple of entries in your /etc/passwd roughly looking like this:

johnG:x:1042:100::/home/johnG:/bin/bash abc:x:1042:100::/home/abc:/bin/bash 

Assuming this to be the case, in practice I would not expect a duplicate UID to cause any particular problems, except that the OS will only report one of johnG and abc as the owner of things

[root@1c0a37124afc /]# ll /home total 8 drwx------ 2 johnG users 4096 Aug 21 16:19 abc drwx------ 2 johnG users 4096 Aug 21 16:18 johnG 

Assuming you don't want abc (and that your NAS has some common tooling available), you could remove it (and its home directory) like so

userdel --remove abc 
4
  • If I've not hit the nail on the head with my assumptions here, please update the question with more information. Commented Aug 21, 2024 at 16:24
  • Hey bxm. You sledgehammered it on the head. Apologies for the lack of clarity on my part. I'm just a couple of rungs up above newb. OK so I can relax knowing it won't cause an issue. But how is it even possible that could happen? And would userdel-- remove abc carry a potential problem, in regards to the app(s) it's tied in to. I did notice as I was trying to understand the issue that in some instances using SSH that it recognized johnG's existence and not abc and vice versa. Thank you! Commented Aug 21, 2024 at 20:34
  • It's difficult to say if it would cause issues if there are "app(s) it's tied in to" (perhaps you can clarify that with a question edit). I would attempt to unpick such tie-ins if you can before removing the user. Worst case, you can always re-add the abc, with useradd abc -u 1042 -o. Alternatively you could probably just leave it all alone. Commented Aug 24, 2024 at 20:33
  • 1
    Different tools might report johnG or abc, and may do so inconsistently, it likely depends on how they enumerate the accounts and/or store of copy that information. Commented Aug 24, 2024 at 20:35

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.