• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FTP Server to dynamically create users
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FTP Server to dynamically create users


  • Subject: Re: FTP Server to dynamically create users
  • From: Gnarlodious <email@hidden>
  • Date: Fri, 07 Jan 2005 13:46:37 -0700

Entity Greg Wootten spoke thus:

> I am looking for an FTP server (OS X Server 10.3.7) that I can applescript to
> create users on the fly. I am currently looking at Rumpus. I can write to the
> usres table easily enough, but can't figure out how to get the app to update
> without quitting and restarting. Any ideas, specifically with Rumpus or any
> other FTP program where I can dynamically create/delete users, would be
> greatly appreciated.

set nl to ASCII character 10
set newUser to "abuser"

set createUser to quoted form of "user=" & newUser & nl & ¬
    "# create a user named $user with password 1234" & nl & ¬
    "# to remove the user later try nidump -destroy / /users/$user" & nl & ¬
    "niutil -create / /users/$user" & nl & ¬
    "niutil -createprop / /users/$user uid 532" & nl & ¬
    "niutil -createprop / /users/$user realname\"$user\"" & nl & ¬
    "niutil -createprop / /users/$user home\"/Users/$user\"" & nl & ¬
    "niutil -createprop / /users/$user shell\"/bin/bash\"" & nl & ¬
    "niutil -createprop / /users/$user gid 20" & nl & ¬
    "niutil -createprop / /users/$user passwd\"rQ3p5/hpOpvGE\" #(it's 1234)"
& nl & ¬
    "chown -R $user:staff /Users/$user" & nl & ¬
    "chmod -Rf 755 /Users/$user"

do shell script createUser


-- Gnarlie's Applescript page:
http://Gnarlodious.com/Apple/AppleScript/

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: FTP Server to dynamically create users
      • From: Simon Forster <email@hidden>
References: 
 >FTP Server to dynamically create users (From: "Greg Wootten" <email@hidden>)

  • Prev by Date: Re: Date computation
  • Next by Date: Here is the completed script
  • Previous by thread: FTP Server to dynamically create users
  • Next by thread: Re: FTP Server to dynamically create users
  • Index(es):
    • Date
    • Thread