LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problems with Windows Domain shares? (https://www.linuxquestions.org/questions/linux-networking-3/problems-with-windows-domain-shares-4175537618/)

micke76 03-23-2015 12:30 PM

Problems with Windows Domain shares?
 
I have a problem with my Windows Domain share. I can't connect to it.
Here is my fstab file:
Code:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=cd24500e-3f48-44fa-b7f1-ca188f0e116f /              ext4    errors=remount-ro 0      1
# /boot/efi was on /dev/sda1 during installation
UUID=234D-8B07  /boot/efi      vfat    defaults        0      1
# swap was on /dev/sda3 during installation
UUID=e0108d16-999f-42f0-baf7-bcf4f26de592 none            swap    sw              0      0

//DOMAIN-PC/MediaContents /home/likewise-open/Test/Media cifs sec=ntlmv2,credentials=/root/.kencred,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Here is my .kencred file:
Code:

username=MAINDC\Ken
password=*******

If I use sec=ntlm and run mount -a then I get this error:
Code:

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

If I use sec=ntlmlv2 and run mount -a then I get this error:
Code:

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

But I can manually mount an Windows Domain share with this command line.
Code:

mount -t cifs //DOMAIN-PC/MediaContents /home/likewise-open/TEST/Media -o username=Ken,domain=MAINDC,iocharset=utf8,file_mode=0777,dir_mode=0777
Can somenone help how to mount a windows domain share automatically?

T3RM1NVT0R 03-23-2015 12:48 PM

I have had similar issue with CIFS share configured on Windows. I had to tweak registry to get it working. I don't have the document which I referred at the time handy with me but what I can say it is not your destination (Linux machine) which is a problem it is the source machine (Windows machine)

You might want to have a look at these:

http://superuser.com/questions/67519...r13-permission

https://wiki.archlinux.org/index.php...roubleshooting

Though above links are not the ones which I remember to be using when I was working on the issue. I thought you might find it useful.

thegwer 03-23-2015 09:18 PM

Sure
create a shell script with
Code:

mount -t cifs //DOMAIN-PC/MediaContents /home/likewise-open/TEST/Media -o username=Ken,domain=MAINDC,iocharset=utf8,file_mode=0777,dir_mode=0777
Then add the script to rc.local :-)

T3RM1NVT0R 03-23-2015 09:36 PM

@ thegwer

Code:

mount -t cifs //DOMAIN-PC/MediaContents /home/likewise-open/TEST/Media -o username=Ken,domain=MAINDC,iocharset=utf8,file_mode=0777,dir_mode=0777
Putting this in /etc/rc.d/rc.local will not mount the share because when he said it works when he run the command manually he forgot mention that he has to put in the password at the password prompt to get it mounted. If you look at the command it only supplies the username and not the password for the mount.

Doug G 03-25-2015 12:02 AM

Also I think you need to use a / to separate your domain and usernames in your creds file. I usually specify the domain on it's own line so I don't need to remember which way the slash should lean.

micke76 03-25-2015 04:05 AM

When I specified the domain on it's own line I got it to work fine, like this

Code:

username=Ken
password=*******
domain=MAINDC


micke76 03-26-2015 08:15 AM

How do I "integrate" my Windows Domain home user 's folders to Linux home userīs folders when I log in as domain user at Linux copmuter?


All times are GMT -5. The time now is 07:44 PM.