[jcifs] Create homeDirectory from user and assing permissions using jcifs

Felipe García torcaz99 at hotmail.com
Tue Dec 11 02:59:36 MST 2012


   I'm creating user accounts in Active Directory using ldap commands.
   Later,  I create his "homeDirectory" using cifs using:
    new (SmfFile('smb://DOMAIN;username:passwd@server/share/User').mkdir();

   with username an Active Direcctory account to create the account and "User" the home directory for user "User".

   But now, I need to change owner of the folder from "username" to the new "User". And assign necessary permissions to other users and groups.
   I've used a user called "admin" to create the user "user1". And I'd like to change permission to allow other users/groups to access this share:
   I need to change owner on  folder "user1" from "admin" to "user1".
   Allow acess:
   DOMAIN\Adminsitrators --> All permissions.
   DOMAIN\Operator --> Read, Write, execution.
   DOMAIN\user1   --> Read, Writ, Execution, Modify, Read an execute.

   Can any tell me if is possible?

   I'm using CIFS 1.2.25 (not allowed to upgrade java).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20121211/475cc662/attachment.html>

More information about the jCIFS mailing list