How to create a new user?

Discussion in 'Site & Server Administration' started by DomainMagnate, Nov 24, 2007.

  1. #1
    Hey everyone,

    A quick linux question here :eek:

    How do I create a new user on linux via ssh with same permissions as root.
    I need a programmer to run some scrips on my server but don't want to give him the root password.

    thanks

    ~MG
     
    DomainMagnate, Nov 24, 2007 IP
  2. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
  3. DomainMagnate

    DomainMagnate Illustrious Member

    Messages:
    10,932
    Likes Received:
    1,022
    Best Answers:
    0
    Trophy Points:
    455
    #3
    thanks, but it's on linux, not freebsd
     
    DomainMagnate, Nov 24, 2007 IP
    Will.Spencer likes this.
  4. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #4
    oops misread lemme check it out give me some time

    Edit

    1. Log into your server with an SSH client, then "su -" to root (do not forget the "-" after su).

    2. Add the user and set the password:

    # adduser testuser
    # passwd testuser
    Changing password for user testuser.
    New password:
    Retype new password:
    passwd: all authentication tokens updated successfully.

    3. By default, a user has shell access (SSH or telnet if enabled). Users should not have shell access unless they really need it. Web site users and e-mail only users do not need shell access.

    # chsh -s /sbin/nologin testuser
    Changing shell for testuser.
    Shell changed.

    4. If you have an FTP server running, the user will also have FTP access. If users will only be checking mail, you will want to disable FTP access as well as shell access. Adding their username to /etc/ftpusers will prevent them from logging into FTP.

    # echo testuser >> /etc/ftpusers
     
    PowerExtreme, Nov 24, 2007 IP
  5. DomainMagnate

    DomainMagnate Illustrious Member

    Messages:
    10,932
    Likes Received:
    1,022
    Best Answers:
    0
    Trophy Points:
    455
    #5
    Hey, I can google too, it's a bit more complicated ;)
     
    DomainMagnate, Nov 24, 2007 IP
  6. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #6
    PowerExtreme, Nov 24, 2007 IP
    DomainMagnate likes this.