Page 2 of 2

Re: Delete a user via ssh

Posted: 20 Mar 2022, 16:30
by RyanYang
When you backed up your system configuration, which version of TOS did you use? We need to verify your question. To completely remove information about undisplayable users, you need to reinstall the system.

Re: Delete a user via ssh

Posted: 21 Mar 2022, 08:35
by capnhowyoudo
Verify my information ? what does that mean? seriously its a simple question HOW DO YOU DELETE A USER VIA SSH????????

What is so complicated about that? is it similar to:

1. sudo su -
2. userdel user's username

Seriously what the heck is so complicated about giving an answer like that?

Re: Delete a user via ssh

Posted: 21 Mar 2022, 08:42
by capnhowyoudo
Do you see i even drew pictures for you!!!!!

I can login with the account "admin" which i created not to be confused with "Administrator" however the account "admin" does not exist in the user options therefore i can not assign permissions to a user that does not exist nor can i delete the user cause it does not exist.

Re: Delete a user via ssh

Posted: 21 Mar 2022, 17:10
by TMSupport
Did the device reboot after restoring the configuration? Normally, the situation you describe should not occur. You can try to restart the device to verify whether the admin account can still be used normally. If it still exists, you can contact our tech team to check remotely.

Re: Delete a user via ssh

Posted: 26 Apr 2022, 10:49
by TM220user
TMnorah wrote: 19 Mar 2022, 14:36 The terminal command line cannot delete the TOS user,it can only be deleted on the web page. You can create a user with the same name on the web page, change the permissions of the shared folder, and then delete the user.
There HAS TO BE a command available in SSH for removing users manually....I mean, the command to add users works perfectly fine in SSH (sudo useradd <user name >).

While *yes*, users can be "removed" (technically not accurate; as I have several past users showing up in shell when I run the command "ls -l /home", who ARE NOT displayed in the user's list in the TOS GUI for 'Control Panel > Users'), they are not ACTUALLY being removed.
More like: only hidden from the GUI.

Don't you guys consider this a security problem?

Why won't you provide us (your customers) with the command line to manually REMOVE a user using the shell (via SSH in other words)??

'Userdel' obviously has been disabled, or is not the correct syntax for the command.

Please provide the command to remove/delete a user account.

Thank you.

Re: Delete a user via ssh

Posted: 26 Apr 2022, 14:09
by TM220user
{L_BUTTON_AT}capnhowyoudo

Hey capn...
After a bit of searching (when I found out that 'userdel' doesn't work in TOS), I did a Google search (force-omitting 'userdel' from results) and found this Ubuntu command worked:

'deluser'

IE: sudo deluser <username>

Your situation may be different from mine (mine has user accounts listed [several with root privileges] that were manually removed via the GUI, but persist in the shell data somewhere), but the command works *as long as* it's an active, current user!

My problem is, I still have users that need to be removed, and because they are not active users (having been previously removed using the TOS GUI), the 'deluser' command doesn't work (for me).

Best of luck, and I hope this helps you!

Re: Delete a user via ssh

Posted: 26 Apr 2022, 17:24
by TM220user
OK, I clearly need to apologize here.
TM220user wrote: 26 Apr 2022, 10:49 I have several past users showing up in shell when I run the command "ls -l /home", who ARE NOT displayed in the user's list in the TOS GUI for 'Control Panel > Users'), they are not ACTUALLY being removed.
More like: only hidden from the GUI.

Don't you guys consider this a security problem?
Like a dog fixated on a bone (oblivious to the rest of the world), I wasn't thinking clearly. And as a result, lept to the wrong conclusions.

Thinking more about it, the entire purpose of the above command is to list home directories.
NOT active users. /sigh

I'm profusely sorry for posting in such haste.
Please forgive me!

I did get the appropriate directories removed, and all is well on that front. (Still looking into the user issue, but won't risk commenting further until I'm SURE of the situation.)

I'm still curious though why the support team couldn't simply say before that the base command to remove a user via SSH is "deluser"?

And for posterity, the base command to remove a group via SSH is similar: "delgroup".

Additionally @TMSupport: why aren't user home groups (and all other data recursively) deleted (by default) when you remove a user account using the GUI?

Re: Delete a user via ssh

Posted: 26 Apr 2022, 21:25
by capnhowyoudo
{L_BUTTON_AT}capnhowyoudo
TM220user wrote: 26 Apr 2022, 14:09 Hey capn... After a bit of searching (when I found out that 'userdel' doesn't work in TOS), I did a Google search (force-omitting 'userdel' from results) and found this Ubuntu command worked: 'deluser' IE: sudo deluser <username> Your situation may be different from mine (mine has user accounts listed [several with root privileges] that were manually removed via the GUI, but persist in the shell data somewhere), but the command works *as long as* it's an active, current user! My problem is, I still have users that need to be removed, and because they are not active users (having been previously removed using the TOS GUI), the 'deluser' command doesn't work (for me). Best of luck, and I hope this helps you!
Thanks for the information! When I get home today I’ll give this a try and keep you updated ! Thanks again!

Re: Delete a user via ssh

Posted: 07 May 2022, 07:44
by TM220user
capnhowyoudo wrote: 26 Apr 2022, 21:25 Thanks for the information!

When I get home today I’ll give this a try and keep you updated !

Thanks again!
How'd things work out for you?