Results 1 to 2 of 2

Thread: how can i set up user accounts using the command line

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default how can i set up user accounts using the command line

    i am new to scripting i was wondering could you help me? ihave to create a script to set up accounts for new users im giving a new list of users names and a list of files in/hers home directory (folder). for each new user the home folder needs to be created if it does not already exsist. the files on the list need to be copied there and their permissions need to be set to read, write and excute for the user only.

    it will need to have four run time arguements

    1. a path to a file listing the new user names
    2.a path to a file listing the files to be copied
    3.a path to a folder where master copiesof the files are stored
    4.a path to a folder where the new home folders will be created

    if the file listing the new user names is not the path provided then it should display an error meassage and halts without further processing.
    the script also checks the master copies of all the files and if any are missing then it displays an error message

    the script checks if any of the user names already have home folders in the home folder path. if so the user is asked wheather to delete or keep the contents.

    thanks

  2. #2
    Junior Member
    Join Date
    Jan 2013
    Posts
    6
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Default

    mkdir, useradd (or adduser depending on distro), chmod, skeleton files, cp, rm, and programming prompts. Look up man pages and information on those (ESPECIALLY useradd) and you'll find the answer to your questions pretty quickly.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. migrate multiple accounts using command line
    By nokia3310 in forum Backup And Recovery
    Replies: 1
    Last Post: 8th June 2011, 01:08 PM
  2. Create new user account in Ubuntu Linux from command line
    By sweta in forum Getting started tutorials
    Replies: 3
    Last Post: 7th February 2010, 12:15 PM
  3. Postfix user accounts
    By mewrei in forum Mail Servers
    Replies: 4
    Last Post: 1st November 2009, 04:39 AM
  4. Replies: 1
    Last Post: 2nd March 2009, 04:02 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41