Results 1 to 4 of 4

Thread: Create new user account in Ubuntu Linux from command line

  1. #1
    Contributors sweta's Avatar
    Join Date
    Feb 2005
    Location
    New Delhi
    Posts
    225
    Thanks
    20
    Thanked 12 Times in 12 Posts
    Rep Power
    12

    Default Create new user account in Ubuntu Linux from command line

    Tutorial - How do I create new user account in Ubuntu Linux from command line?

    Use useradd command create a new user or update default new user information from command line.

    Create sweta user account in Ubuntu Linux from command line, enter:
    Code:
    useradd sweta
    Setup a password:
    Code:
    passwd sweta
    Important files
    • /etc/passwd - User account information.
    • /etc/shadow - Secure user account information such as password.
    • /etc/group - Group account information.
    • /etc/default/useradd - Default values for account creation.
    • /etc/skel/ - Directory containing default files.
    • /etc/login.defs - Shadow password suite configuration.
    Last edited by sweta; 21st June 2007 at 01:51 AM.

  2. #2
    Junior Member
    Join Date
    Feb 2010
    Posts
    1
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Login not successfull

    As far as I experienced you are logged in for less than 10 seconds.

    It says Your home directory is listed as: /home/scheiber but is does not appear to exist.

    When trying to acces the important files it says 'unsufficient privilege'

    How do i make the account fully operational? I only have the single user account and the root password

    Regards Arie

  3. #3
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,515
    Thanks
    17
    Thanked 814 Times in 511 Posts
    Rep Power
    10

    Default

    Some distro configures useradd / adduser commands to create a directory while adding a user account. I suggest you use -m switch to create home directory for new user.
    Code:
    useradd -m -s /bin/bash userName
    passwd userName
    To solve your current problem, login as root and create directory manually:
    Code:
    cd /home
    ls -l
    mkdir scheiber
    chmod  0700 scheiber
    chown -R scheiber:scheiber scheiber
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  4. The Following 2 Users Say Thank You to nixcraft For This Useful Post:

    madhudeva (7th March 2010), scheiber (9th February 2010)

  5. #4
    Senior Member vamsi's Avatar
    Join Date
    Nov 2009
    Location
    Bangalore / India
    Posts
    263
    Thanks
    138
    Thanked 14 Times in 12 Posts
    Rep Power
    6

    Default

    you can also define the home directory my appending -d following with the path of the directory..
    for more detailed explanation on useradd command..
    type man useradd in terminal
    shebangs

  6. The Following User Says Thank You to vamsi For This Useful Post:

    scheiber (9th February 2010)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Solved] How to create multiple user account?
    By droidwork in forum Shell scripting
    Replies: 14
    Last Post: 20th October 2010, 10:30 AM
  2. Ubuntu Linux add a user to group
    By sweta in forum Ubuntu / Debian
    Replies: 0
    Last Post: 1st November 2007, 02:41 AM
  3. Command line remote access
    By angelus_kit in forum Networking, Firewalls and Security
    Replies: 7
    Last Post: 5th September 2007, 06:30 PM
  4. Replies: 0
    Last Post: 20th December 2006, 02:13 PM
  5. Replies: 0
    Last Post: 20th December 2006, 02:01 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
  •