If you have Microsoft Framework 4.6 installed, sudo command failed after insert Passphrase with this error:
Passphrase:
Eccezione non gestita: System.Xml.XmlException: Errore durante l'analisi di EntityName. Riga 78, posizione 26.
Server stack trace:
in System.Xml.XmlTextReaderImpl.Throw(Exception e)
in System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
in System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
in System.Xml.XmlTextReaderImpl.ParseAttributes()
in System.Xml.XmlTextReaderImpl.ParseElement()
in System.Xml.XmlTextReaderImpl.ParseElementContent()
in System.Xml.XsdValidatingReader.Read()
in System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
in System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
in System.Xml.XmlDocument.Load(XmlReader reader)
in Sudowin.Plugins.Authorization.Xml.XmlAuthorizationPlugin.LoadFromDataSource(String connectionString, Uri schemaFileUri)
in Sudowin.Plugins.Authorization.Xml.XmlAuthorizationPlugin.Open()
in Sudowin.Plugins.Authorization.Xml.XmlAuthorizationPlugin.GetUserInfo(String userName, UserInfo& userInfo)
in System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
in System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
in System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
in Sudowin.Plugins.Authorization.IAuthorizationPlugin.GetUserInfo(String userName, UserInfo& userInfo)
in Sudowin.Server.SudoServer.Sudo(String passphrase, String commandPath, String commandArguments)
in System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
in System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [1]:
in System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
in Sudowin.Common.ISudoServer.Sudo(String password, String commandPath, String commandArguments)
in Sudowin.Clients.Console.Program.InvokeSudo(String password, String commandPath, String commandArguments)
in Sudowin.Clients.Console.Program.Main(String[] args)
Thanks in advance
Regards
Wow sorry to hear that. I haven't worked on Sudowin for a long time. I had made some enhancements, but the original creator no longer works on it.
I can't promise anything, but I'll see if I can create a build that works with latest .NET.
Hey, that's not true, I do work on it. You know, occasionally :). I actually had planned to move it to Github in prep for a .NET conversion to a newer CLR.
The reason I stopped updated was because I was just stumped on how to handle Active Directory. Basically I couldn't figure out how to prevent an authorized sudoer from possibly abusing a network-enabled version of sudowin.
I really appreciate Killman picking up the slack on this project. Thanks again. I will also take a look at this when I have the time. The error is interesting as it isn't where I'd expect something to fail. I wonder if it's an i18n issue. Is your XML in a locale other than en-US?
Thank you again.
Sorry about that. I haven't seen any updates so figured you moved on.
Hi Killman,
No worries. There haven't been any updates because I tried to make a go out of monetizing Sudowin and just couldn't find the interest. I figured if I had added AD support it would have helped, but then Windows started introducing UAC and changing so much of their security profile that with a wife and kids and mortgage it just seemed to be a fool's errand to try and keep pushing this towards some type of full-time gig. But yeah, Sudowin is always in the back of my mind. I do occasionally think how I could improve it if I rewrote it from scratch today.
my sudoers.xml is on a network share, my local installation is on a italian operating system (win7/win10)
Thanks in advance
Do you have any news about the issue? Thanks in advance
Sorry. Can you send me your sudoers.xml file to kiliman@gmail.com?
Most of the issues I've seen are related to non-English versions of Windows. I was able to install SudoWin on my current Windows 10 machine without any problems, and I have .NET 4.6.1 installed.
Thanks!
Last edit: Kiliman 2016-11-07
Mail sent. Thanks!
As Kilimin suggests me, I've substituted "&" characher with "&" in my sudoers.xml.
So, Sudowin doesn't generate the exception and It works correctly! Thanks for your great support!
Glad I could help.
Looks like SourceForge swallowed the entity. Anyway, like Nicola said, he simply needed to use the correct entity encoding for the ampersand. Should look like this: & amp; (no space).
So the lesson here is to make sure that you use valid XML in your sudoers.xml file.