Results 1 to 5 of 5

Thread: Problem creating script (create delete users)

  1. #1
    Join Date
    Dec 2013
    Beans
    3

    Question Problem creating script (create delete users)

    Hi, i would like to create a script that can create and delete users and show time and date when user created and deleted. i would like as well if it possible the script to ask me when i am deleting a user if i want to store all the files and informations about user (time and date created-deleted). Thanks in advance any help will be helpfull !!

  2. #2
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Problem creating script (create delete users)

    You'd probably want your script to wrap around useradd and userdel. Then if creation or deletion is successful it can echo the action, user, and date-time to a custom log file in /var/log/

  3. #3
    Join Date
    Dec 2013
    Beans
    3

    Re: Problem creating script (create delete users)

    Thanx for your quick response. Is it possible if its not very dificult for you to create and send me a script like this because i am trying and i cant, i ve no idea from scripts, its something that never developed

  4. #4
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Problem creating script (create delete users)

    What have you tried so far?

    I would start with not actually creating or deleting users then but instead just making a script that prints out (using echo) the line you think you would use. You'll want to get input from the user and use that in a variable:

    https://help.ubuntu.com/community/Be...ting#Variables

  5. #5
    Join Date
    Dec 2013
    Beans
    3

    Re: Problem creating script (create delete users)

    ill go to my home and ill post what if done so far and i hope you can help me finish this. many thanks for your quick response again !!

Tags for this Thread

Bookmarks

Posting Permissions

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