Error 5 On Netshareenum Of
Contents |
Management Converged Platforms Data Protection Infrastructure Management Platform Solutions Security Storage Dell Products for Work Network Servers Education Partners Programs Highlighted Communities Support » Connect netshareenum c# » Developers » Partners » Downloads » 日本語コミュニティ EMC Community Dell
Netshareenum Example
Community A AppSync Application Xtender Atmos Avamar C Captiva Celerra Centera CLARiiON Cloud Tiering Appliance Connectrix netshareenum all request D Data Domain Data Protection Advisor Disk Library DiskXtender Documentum E ECS eRoom G Greenplum H Host Systems I InfoArchive Isilon ISIS Document Imaging L Leap N netshareadd NetWorker P PowerPath Prosphere R RecoverPoint Replication RSA S ScaleIO Secure Remote Smarts SourceOne & EmailXtender EMC Storage Analytics Symmetrix U Unity V ViPR Controller Product Communities > Celerra > Discussions Please enter a title. You can not post a blank message.
Netsharegetinfo
Please type your message and try again. 10 Replies Latest reply: Jan 24, 2013 9:40 AM by Rainer_EMC Sharedup error: Error=0x00000005: NetShareEnum:Access is denied patrix55 Jan 23, 2013 6:18 PM Hi Folks,I'm having a problem with sharedup. I am trying to copy several hundred shares from a celerra to vnxe platform. When I run sharedup I get the following error: Error=0x00000005: NetShareEnum:Access is denied. Here is my command: sharedup.exe \\celerra-file-server \\vnxe-fileserver ALL /SD. I suspect this is a problem with the celerra because if I use a different source file server i.e. a file server from a vnx or vnxe system the command works without error. All file servers are connected to the same AD domain, using the same AD account when running the sharedup command. Does anyone have any suggestions? Let me know if you need further info...Thanks! 822Views Tags: none (add) support Content tagged with support , celerra Content tagged with celerra , celerra_file_server Content tagged with celerra_fil
Post your question and get tips & solutions from a community of 418,502 IT Pros & Developers. It's quick & easy. specifying password using NetShareEnum P: wnetopenenum n/a Siddharth Jain hello I am trying to enumerate the shared folders on netshareenum powershell a server using the NetShareEnum function. Now, when the server has a password set to access the shared folders, the
Netapibufferfree
function returns system error code 5 (access denied). However, if I know the password to access the shares, how can I specify that in my program? The basic skeleton of my prog is https://community.emc.com/thread/168880?tstart=0 as follows: StructLayout( LayoutKind.Sequential )] public struct SHARE_INFO_0 { [MarshalAs( UnmanagedType.LPWStr )] public String shi0_netname; } [DllImport("Netapi32.dll")] public static extern int NetShareEnum([MarshalAs(UnmanagedType.LPWStr)] string servername, Int32 level, out IntPtr bufptr, Int32 prefmaxlen, [MarshalAs(UnmanagedType.LPArray)] Int32[] entriesread, [MarshalAs(UnmanagedType.LPArray)] Int32[] totalentries, [MarshalAs(UnmanagedType.LPArray)] Int32[] resume_handle ); [DllImport("Netapi32.dll")] public static extern int NetApiBufferFree(long lpBuffer); public static string[] GetShares(string server) { IntPtr buf = new IntPtr(0); Int32[] dwEntriesRead = new Int32[1]; dwEntriesRead[0] = https://bytes.com/topic/c-sharp/answers/259365-specifying-password-using-netshareenum 0; Int32[] dwTotalEntries = new Int32[1]; dwTotalEntries[0] = 0; Int32[] dwResumeHandle = new Int32[1]; dwResumeHandle[0] = 0; Int32 success = 0; string[] shares = new string[0]; success = NetShareEnum(server, 0, out buf, -1, dwEntriesRead, dwTotalEntries, dwResumeHandle); if(dwEntriesRead[0] > 0) { SHARE_INFO_0[] s0 = new SHARE_INFO_0[dwEntriesRead[0]]; shares = new string[dwEntriesRead[0]]; for(int i = 0; i < dwEntriesRead[0]; i++) { s0[i] = (SHARE_INFO_0) Marshal.PtrToStructure(buf, typeof(SHARE_INFO_0)); shares[i] = s0[i].shi0_netname; buf = (IntPtr)((long) buf + Marshal.SizeOf(s0[0])); } NetApiBufferFree((long) buf); } return shares; } Nov 16 '05 #1 Post Reply Share this Question 1 Reply P: n/a Willy Denoyette [MVP] 1. You can't specify user credentials when using the Net API's, please read the WIN32 API description carefully (especially the remarks and the Security Requirements for the Network Management Functions. ) You have to impersonate or you need to create a session with the server using an administrative share (net use \\server\IPC$ ....) 2. Your NetShareEnum declaration is incorrect, the last 3 arguments should be out int entriesread, out int totalentries, ref IntPtr resume_handle 3. You better stay away from WIN32 API calls if managed solutions are available, System.Management or System.DirectoryServices are built to allow you to perform network management t
date ] [ thread ] [ subject ] [ author ] the first mail was blocked because too big :-) I keep the log.nmbd for you if you want again here is in attachement my smb.conf file and the /var/log/samba files during the call at NetShareEnum (log level = 10) On the Windows 2000, I https://lists.samba.org/archive/samba/2005-May/105996.html call NetShareEnum with a process with the "BUDDY\hky" identity (BUDDY is a Win 2000 standalone server) fionux is the Redhat psychee 32 bits samba server with to share hky and froupie hky is also a user on the linux with the same password as on Windows in the smb.conf file, I set hky as a guest account I did it without this line with the same error on NT thanks for your help hervé Gerald (Jerry) Carter a écrit : > Hervé Kergourlay wrote: error 5 > > >Is there anybody to help me ? > >Is it the right place for that sort of technical request ? > > >I have the same problem on AS400 > > > >Hervé Kergourlay a écrit : > > >>I'm trying to list my Linux shared exported by samba > >>from a Windows 2003 I'm using the NetShareEnum api > >>the sample is working between 2 windows but it fails > >>on the linux with error 5 Access Denied > >> > >>who error 5 on to configure samba on the linux to ba able to > >>do that ? > > > This kind of questions are better suited for the samba-technical > ml. This is the general community list. > > Have you looked at the traces against the linux box? > Also look at a level 10 debug log from smbd to see why the > call is failing. > > > > > cheers, jerry > ===================================================================== > Alleviating the pain of Windows(tm) ------- http://www.samba.org > GnuPG Key ----- http://www.plainjoe.org/gpg_public.asc > "I never saved anything for the swim back." Ethan Hawk in Gattaca -------------- next part -------------- # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options (perhaps too # many!) most of which are not shown in this example # # Any line which starts with a ; (semi-colon) or a # (hash) # is a comment and is ignored. In this example we will use a # # for commentry and a ; for parts of the config file that you # may wish to enable # # NOTE: Whenever you modify this file you should run the command "testparm" # to check that you have not made any basic syntactic errors. # #======================= Global Settings ===================================== [global] # workgroup = NT-Domain-Name or Workgroup-Name workgroup = 4tec-vannes # server string is the equivalent of the NT Description field server str