Advertisement: Linux VPS from $4/month - contact support for custom offer.
+ Post New Thread
Results 1 to 2 of 2

Thread: How to add new user with root permissions in Linux

  1. #1
    Administrator
    Join Date
    Mar 2013
    Posts
    2,725

    How to add new user with root permissions in Linux

    Hello,

    what is the most simple way to add new Linux user with root/sudoers permissions/rights?

    NEW METHOD:

    adduser user --gecos GECOS && usermod -aG sudo user

    Switch to new user: su user; cd

    OLD METHOD:

    Login as root

    adduser newusername
    passwd newusername

    # visudo
    copy line: root ALL=(ALL) ALL
    and paste it below that line and modify username so it look like this:

    root ALL=(ALL) ALL
    newusername ALL=(ALL) ALL

    type: :wq

    hit enter

    # exit

    login as new user: ssh newusername@IP

    to run root commands under newusername, add "sudo" before the command and use your "newusername" password as a confirmation.

  2. #2


    Is this useful / helpfull? Yes | No
    login as new user: ssh newusername@IP

+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 10-21-2016, 08:39 PM
  2. Replies: 0
    Last Post: 08-05-2016, 10:56 AM
  3. Replies: 0
    Last Post: 04-21-2014, 12:54 AM
  4. Replies: 0
    Last Post: 03-20-2014, 06:28 PM
  5. Replies: 0
    Last Post: 02-03-2014, 01:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam