Announcement

Collapse
No announcement yet.

change root user / accounts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    change root user / accounts

    so in my scenario , i had my 1 account setup (root) , but my kids was getting more and more on my pc and doing whatever they do
    so i was starting to get worried that they could install/delete stuff ,cause login password is the same as root password on admin account.
    PS: i did 1st create 2 new user accounts for them (standard user) , but then found everything they are used to is gone ( they're used to log into my account with everything set up)
    so what i did it is create another sysadmin account and then made my usual account standard ,so they can log into my usual account and everything seems like they used to by now, but they cant "change" anything.
    if any1 find them self's in the same situation , here are the steps:

    basically it goes like this
    -Keep your current account (xxx) exactly as it is.
    -Create a new account called sysadmin (or similar) and add it to sudo.
    -Remove xxx from the sudo group.

    like this :
    Create the new admin account
    Code:
    sudo adduser sysadmin
    You'll be asked to set a password for sysadmin.​

    Add sysadmin to the sudo group
    Code:
    sudo usermod -aG sudo sysadmin
    .

    Test the new account

    Before removing xxx from sudo, log out and log into sysadmin.
    Open a terminal and run:
    Code:
    sudo whoami
    It should return:
    root
    If it does, you're good.

    Remove xxx from the sudo group
    Log back into sysadmin (important!), then run:
    Code:
    sudo deluser xxx sudo
    Verify:
    Code:
    groups xxx
    You should no longer see sudo in the list.

    Test xxx
    Log back into your normal xxx account and try:
    Code:
    sudo apt update
    You should get:
    xxx is not in the sudoers file. ( or in my case sudo: I'm sorry xxx. I'm afraid I can't do that)

    and that's that ...

    IMPORTANT :
    Whenever you need to do admin tasks
    Code:
    su - sysadmin
    hope this helps someone with kiddies on their PC


    PS : if there is an alternative way , i'd love to hear (read) it



    Last edited by die.boer; Today, 01:56 PM.
    ʟɨռʊӼ ʄօʀ ʟɨʄɛ

Users Viewing This Topic

Collapse

There is 1 user viewing this topic.

Working...
X