Unable to delete the vyos user

Not sure if this is the correct category but I’m attempting to delete the vyos account. I’ve created an account called admin. I logged out of the vyos account and logged into the admin account, however, when I commit it gives me the following error:

Attempting to delete current user: vyos

[[system login]] failed
Commit failed

I am in fact logged in as admin and not vyos. I’ve tried rebooting and then deleting it but nothing seems to be working. Any help would be greatly appreciated.

I want to add I’m currently using the latest rolling release.

Is this what you did? Works for me on VyOS 1.5-rolling-202405060019

vyos@vyos-A# set system login user test
set system login user test authentication plaintext-password PASSWORD
vyos@vyos-A# commit
vyos@vyos-A# save
LOGOUT
LOGIN with new account

test@vyos-A:~$ set system login user vyos disable
test@vyos-A# commit
test@vyos-A# save

I did delete system login user vyos

Deleting is not an option per the op commands it’s to be disabled. Did you issue the linux command to userdel/deluser instead?

test@vyos-A# set system login user vyos
Possible completions:
 > authentication       Authentication settings
   disable              Disable instance
   full-name            Full name of the user (use quotes for names with spaces)
   home-directory       Home directory```

I misspoke it is an option and it seems to have worked for me:

test@vyos-A# delete system login user vyos
[edit]
test@vyos-A# commit
[edit]
test@vyos-A# save
[edit]
test@vyos-A#
test@vyos-A# show system login user
 user test {
     authentication {
         encrypted-password $6$rounds=656000$QAGTocaeTcoKOCiq$VA34e3ArTVk5Ac4rzl                                     8ttlG9moOzs9CwbCT1ZBsAGBDMomMaNFIWsjCzWQV2ihhMrCkG9/vvEJFX6LaWMR08V1
     }
 }
[edit]
test@vyos-A#

Going the other way now and removing the test account I created:

vyos@vyos-A# delete system login user test
[edit]
vyos@vyos-A# commit
[ system login ]
test is logged in, forcing logout!

[edit]
vyos@vyos-A# save
[edit]
vyos@vyos-A#

I’m just going to redo the entire install and see if something weird happened. Thank you for your help

Looks like it is a bug in the newest version

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.