Results 1 to 4 of 4
- 11-20-2012, 12:18 PM #1
Member
- Join Date
- Nov 2012
- Posts
- 2
- Rep Power
- 0
Java 7 API - Files.getowner returning S-1-5-21-1256266458-1619763451-1018739985-1218
Hi. the files on my remote HP-UX system are accessed in Windows using the Samba map-drive setup. so when i try to obtain the owner of a file in the map-drive by using the API Files.getowner(), it returns me a sequence of digits like S-1-5-21-1256266458-1619763451-1018739985-1218 and not the username. however, if i use the same api for a file under the C:, it returns the username.
can anyone tell me why is the sequence of digits returned when i use the API for a file in the Samba mapdrive? how do i obtain the username and not the seqquence of digits?
- 11-20-2012, 02:30 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 18
Re: Java 7 API - Files.getowner returning S-1-5-21-1256266458-1619763451-1018739985-1
Moved from Eclipse forum.
Also at javaprogrammingforums[URL="http://www.javaprogrammingforums.com/java-se-apis/19478-java-7-api-files-getowner-returning-s-1-5-21-1256266458-1619763451-1018739985-1218-a.html"[/URL]
@OP: Please be frank about cross posting and use links so that everyone taking part in a discussion knows what else is being said. Be aware that many won't spend time on something that has been adaquately dealt with elsewhere, and won't chase about the internet seeing if that might be the case.
It looks like what you're seeing is the Windows SID, perhaps for whoever made the drive mapping. Sorry I don't know how you get a human readable name (if there is one) or the file owner as reported by the remote OS (if that is even possible).
- 11-21-2012, 06:08 AM #3
Member
- Join Date
- Nov 2012
- Posts
- 2
- Rep Power
- 0
Re: Java 7 API - Files.getowner returning S-1-5-21-1256266458-1619763451-1018739985-1
Hi.
When i right click on the file under the Samba map-drive in Windows, go to Properties -> Security tab, there i can see the file owner in human readable form. but when i use the API Files.getowner(), it only returns the SID. is there any other API that will help me to obtain the file owner and not the SID?
- 11-21-2012, 07:47 AM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 18
Re: Java 7 API - Files.getowner returning S-1-5-21-1256266458-1619763451-1018739985-1
Yeah, that confirms what I thought.
Sorry, I have no direct experience with this. Goggle "java windows sid" reveals SID (JCIFS API) which may help.
Similar Threads
-
Calling SQL Server Stored procedure returning resultset using Java
By santtarius in forum JDBCReplies: 1Last Post: 06-19-2012, 10:39 AM -
C++ guy learning Java: No header and source files in Java. Alternatives?
By supernerd in forum New To JavaReplies: 10Last Post: 05-03-2012, 11:19 AM -
Java webstart having problem with multiple jar files and resource files
By rjalori in forum AWT / SwingReplies: 2Last Post: 06-11-2011, 02:54 PM -
Convert avi, mpeg, wmv media files to .flv files in java code
By vinay1497 in forum New To JavaReplies: 8Last Post: 07-30-2010, 06:47 PM -
conversion of java .class files to .java files
By kotturupraveen in forum New To JavaReplies: 2Last Post: 06-09-2008, 01:58 PM
Bookmarks