Adding a network password entry to login keychain via applescript
Hi,
Ive been happily adding "generic" and "application" entries to my login keychain by running an applescript on the login script.
e.g.
set MyName to do shell script "whoami"
set ThePassword to ""
set A4 to "Y009P001"
set A3 to "Y009P002"
try
set ThePassword to text returned of (display dialog "Please re-enter your password to connect to Shared Folders, and Printers." default answer "" with hidden answer)
do shell script "security add-generic-password -a MYDOMAIN" & "\\\\" & MyName & " -s " & A4 & " -w " & ThePassword & " -A"
do shell script "security add-generic-password -a MYDMAIN" & "\\\\" & MyName & " -s " & A3 & " -w " & ThePassword & " -A"
tell application "Finder"
mount volume "smb://MYDOMAIN;" & MyName & ":" & ThePassword & "@nas-w403" & "/" & MyName
mount volume "smb://MYDOMAIN;" & MyName & ":" & ThePassword & "@staffwx/staffcommon"
end tell
end try
However I really need to add a SMB "network" password to the login keychain but security command-line doesnt seem to support it.
Can anybody help me please
iMac, Mac OS X (10.7.2)