Find the answer to your Linux question:
Results 1 to 2 of 2
Hi folks , im new to ubuntu and im attempting to write a script that allows the su to create a new users account and home folder. the script encounters ...
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Posts
    1

    script help



    Hi folks ,
    im new to ubuntu and im attempting to write a script that allows the su to create a new users account and home folder. the script encounters problems when i attempt to set a default password such as "password" for each new user.I keep being requisted to input a unix password. the script is as follows

    echo "enter username"
    read username

    useradd -g its3 -e 2006-06-01 -m $username
    passwd $username "password"


    any help is appreciated

  2. #2
    Just Joined!
    Join Date
    Jan 2006
    Posts
    4

    Expect

    You may want to try using a program called expect. It will allow you to write a script that deals with the prompts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •