Create homeDirectory from user and assing permissions using jcifs
Felipe GarcĂa <[email protected]> Tue, 11 Dec 2012 10:59:36 +0100
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <[email protected]> |
Hello:
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.
Example:
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).
Thanks