LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   backslash in username not passing to windows machine (https://www.linuxquestions.org/questions/linux-networking-3/backslash-in-username-not-passing-to-windows-machine-699203/)

sshaikh 01-22-2009 02:40 PM

backslash in username not passing to windows machine
 
Backslash not passing username to windows machine

Hi Linux Gurus,
Ok I am a newbee to Linux so please don’t mind if the question is too simple for you.

I want to mount a windows file system on Redhat enterprise

Linux xxxxx.xxxxxx.xxx 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux

I am using the following commands

mount -t smbfs -o username=[Domain]/[user.name],password=[passwordwith$andnumber] //XX.XXX.XXX.XX/Changes /mnt/xpfolder
mount -t cifs -o username=[Domain]/[user.name],password=[passwordwith$andnumber] //XX.XXX.XXX.XX/Changes /mnt/xpfolder
mount.cifs //XX.XXX.XXX.XX/Changes /mnt/saiffold credentials=/home/XXXXXXh/.xpmachine


and I am getting the error;

mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

I looked into the Windows event manage to get the following error

Event Type: Failure Audit
Event Source: Security
Event Category: Account Logon
Event ID: 680
Date: 22/01/2009
Time: 18:46:06
User: NT AUTHORITY\SYSTEM
Computer: [from Machine name]
Description:
Logon attempt by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Logon account: [Domain][user.name] comment {------here it should be [Domain]\[user.name]}
Source Workstation: \\{From IP address}
Error Code: 0xC0000064
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

What this is telling me is that I cannot pass the backslash \ to Windows from Linux, On a side not I can connect using smb://…… to the same machine with out a problem so the problem is with Linux not able to pass the \ (backslash to windows) or windows not recognizing it.

Any help will be greatly appreciated thanks for reading

tredegar 01-22-2009 05:03 PM

Too many colours and fonts and italics and underlines and XXXX and xxxx and copy&paste from random places for me to be able to make any sense of your post at all.
You are making me feel SICK.
Please try again, but welcome to LQ!

web_janitor 01-22-2009 05:15 PM

Try this (notice the bolded text) - it works for me in my environment:


mount -t smbfs -o username=[Domain]\\[user.name],password=[passwordwith$andnumber] //XX.XXX.XXX.XX/Changes /mnt/xpfolder

or for cifs mount:

mount -t cifs -o username=[Domain]\\[user.name],password=[passwordwith$andnumber] //XX.XXX.XXX.XX/Changes /mnt/xpfolder

PTrenholme 01-22-2009 07:37 PM

And, to expand slightly on web_janitor's point, the backslash is, in most Linux contexts, an escape character telling the program reading the line to take the character following the backslash without using that character's "special" meaning. So, since backslash has a "special" meaning, you have to escape it.

You could probably also do it by placing single quotes around the string:

mount -t cifs -o username='[Domain]\[user.name],password=[passwordwith$andnumber]' //XX.XXX.XXX.XX/Changes /mnt/xpfolder

I also recommend that you use the cifs type. I believe that smbfs is depreciated and may soon be unsupported.


All times are GMT -5. The time now is 10:54 PM.