1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Windows-Linux Mint network problem

Discussion in 'Linux and Unix' started by laclaque, Jun 21, 2018.

Thread Status:
Not open for further replies.
Advertisement
  1. laclaque

    laclaque Thread Starter

    Joined:
    Feb 26, 2016
    Messages:
    32
    I have 2 computers linked to the router by cable, and there is no wifi involved. Computer A is windows 7, computer B is linux mint. In B, there is an ssd with the system and a large external drive, named mybook, formatted NTFS.

    The network works normally, except that A can't open mybook. And there is something else about mybook : B can open it directly, but not through the network. I mean :
    -in B, if I go through the file system (home > mybook), I can open it,
    -in B, if I go network > B > mybook, I get Unable to mount location, Failed to mount windows share: permission denied.

    My user name and password are identical in both A and B.

    Samba is installed. I did not edit its files.

    In mybook properties, the drive is shared. Others are allowed to create and delete files. Guest access is unchecked.

    The permissions to read, write and execute are set. I checked the 3 special flags Set user id, Set group id and Sticky, but they don't stay that way. Also, I have applied permissions to enclosed files, but the folders of mybook do not show as shared. So I also shared a couple of its folders independently, but they still can't be reached through the network.

    I should probably go with the terminal for shares and permissions, and I googled a lot for that, but I lack some basic knowledge. I have been at this for 2 months. I hope someone can help.
     
  2. Couriant

    Couriant Trusted Advisor

    Joined:
    Mar 26, 2002
    Messages:
    34,608
    First Name:
    James
    Have you tried it with guest access?
     
  3. laclaque

    laclaque Thread Starter

    Joined:
    Feb 26, 2016
    Messages:
    32
    Yes. When I try to open mybook, a box opens asking for user name and password, but at the bottom, it's marked Access is denied. I try anyway : my username, guest, anonymous, with or without a password. Nothing works.
     
  4. Couriant

    Couriant Trusted Advisor

    Joined:
    Mar 26, 2002
    Messages:
    34,608
    First Name:
    James
    I think this would serve more better in the linux forum... but perhaps try using the hostname with the username, so if the host name is CPU1 then you would type CPU1\<username>

    Other than that I think it's an issue within Linux. We can move this thread to there if need be.
     
  5. laclaque

    laclaque Thread Starter

    Joined:
    Feb 26, 2016
    Messages:
    32
    Ok, please move it there.
    Thank you.
    PS: I tried your suggestion, it does not work either.
     
  6. laclaque

    laclaque Thread Starter

    Joined:
    Feb 26, 2016
    Messages:
    32
    I thought the problem might be with the master boot record. I issued the command fdisk -l :

    Disk /dev/sda : 119.2 GiB This is the system disk (an ssd)
    Disklabel type : dos
    Device...
    /dev/sda1 Linux
    /dev/sda2 Extended
    /dev/sda5 Linux swap/solaris

    Disk /dev/sdb : 2.7 TiB This is the disk that gives me headaches
    Disklabel type : dos
    Device...
    /dev/sdb1 HPFS/NTFS/exFAT

    I want to recreate the mbr of sdb. Is the next command right :
    dd if=/dev/zero of=/dev/sdb bs=446 count=1

    If I am not mistaken, I should then reinstall grub ? How do I do that, please ?
    Wouldn't it be enough to reinstall grub ?
    Note: I want to preserve the data on the disc.
     
    Last edited: Jun 22, 2018
  7. tecknurd

    tecknurd

    Joined:
    May 28, 2018
    Messages:
    154
    Your problem is not grub. Installing grub bootloader on the hard drive won't solve anything. It will probably make things worse because it makes it more complicated to boot into Linux. Just keep as it was which is grub on the SSD. If you can boot into Linux without any problems, grub or the bootloader is not your problem.

    The dd command that you are about to do or you already did may erase some data. Advanced Format drives are different compared to the legacy format. The Advanced Format has 4096 bytes while the legacy format is 512 bytes. I think that dd command is for the legacy format, so it won't work for Advanced Format drives.

    In Linux, the directory for each user is stored in /home except root which is the administrator. The /root directory is root's directory. If you are mounting a CIFS or Window Shares on /home/mybook and mybook is the Linux user, this can break your programs from loading which is mainly GUI programs. Any files in /home/mybook won't be deleted, so all you need to do is unmount and your user files will still exist like nothing had happened.

    You can mount Windows Shares to a directory that you created in /mnt or /media.

    The utility fdisk is guessing what filesystem it thinks /dev/sdb1 is. Assuming you already created a directory called windowsdisk in /media, you can type sudo mount /dev/sdb1 /media/windowsdisk. It will try all filesystems that it knows. If it's not successful, /media/windowsdisk will be blank. You will need to install NTFS utilities in order to mount an NTFS partition. You will need to decide what directory this partition is mounted to. If it's an only Linux install on computer B, it's best to use a native Linux filesystem either EXT4 for general purpose or XFS for high performance. NTFS won't utilize the full features of Linux. Also, Linux won't be able to detect if there are any filesystem errors on NTFS.

    I have had access to Windows Shares from Linux multiple times. That was with Windows 98 and Windows XP which are easy to access from Linux. I don't remember how I did it several years ago with Windows Vista. Give me until Friday because of different work schedule this week. What I remember is Vista Windows Shares is different compared to Window XP. Windows Vista and Windows 7 is about the same, but Windows 7 more polished than Vista. In the meantime, I suggest a program called Midnight Commander. This program is run from the terminal. It's the easiest to access to Windows Shares from Linux.
     
  8. laclaque

    laclaque Thread Starter

    Joined:
    Feb 26, 2016
    Messages:
    32
    I didn't use the dd command, and won't consider it anymore. A friend suggested to add a few lines to smb.conf, but that was useless. I also disabled the mint firewall. I cancelled the automatic logon in mint, and now I don't get the logon screen in windows. Finally, I installed Midnight Commander like you said, and I am glad I did.

    About using ext4 or xfs, I would not favor that : mybook is used for backing up my windows computer, and for that reason it should stay ntfs. I am prepared to reformat it ntfs if necessary, though. I might, reluctantly, consider buying another disc for the backups.

    A few details :
    In B, mint is the only os.
    Mybook is mounted in mint without my intervention.
    Mybook is a 3 tb disc and it is almost full.
    Mint can access all the shares in windows.
    Mint is also installed in a virtual box in A ; I call it vmint. Vmint can access all the shares in B, except mybook, like windows. It can see mybook but it can't read it.

    Thank you for your time.
     
  9. tecknurd

    tecknurd

    Joined:
    May 28, 2018
    Messages:
    154
    I don't think your problem is a network problem. It is a problem of missing an alert message in Windows 7 when you connect the external drive when Windows have detected a drive that might have a damaged filesystem. When Linux access NTFS and it is in read-write mode, it will set the flag bit to dirty on the partition or drive that it has accessed. Windows will not give access to a drive if the drive is flagged as dirty. You can either have the external drive be connected before booting into Windows 7 or run chkdsk on the drive. After doing so you should be able to access the external drive.

    Accessing USB drives in Virtualbox is done through the menu bar of the virtual machine that you are running. You have to enable the USB device to be connected to the virtual machine. Then the virtual machine will then see it. The virtual machine may not have USB included, so you need to add USB support to your virtual machine in order for the virtual machine to access USB devices. Though you will have to shuffle between giving up the host OS from accessing USB devices when giving access to the virtual machine.
     
  10. laclaque

    laclaque Thread Starter

    Joined:
    Feb 26, 2016
    Messages:
    32
    > When Linux access NTFS and it is in read-write mode, it will set the flag bit to dirty on the partition or drive...

    That sounds convincing. But the ntfs drive is attached to the linux machine in another room, I don't connect it to the windows machine. And I don't know how to run chkdsk through the network. Is there another way, like changing the flag bit in the linux machine, or something else ?

    As for the linux virtual machine, it's not important. I use it only for getting familiar with linux.
     
  11. tecknurd

    tecknurd

    Joined:
    May 28, 2018
    Messages:
    154
    Sorry, I took a long time to respond. The information that you gave is not enough for me or others to help you. The NTFS support in Linux is light-weight, so it won't be able to fix the filesystem if it has any errors. You have to check it on a computer running Windows. I don't understand why you can't transport the external drive to the computer running Windows. For me or others to help you, please give details about your setup and the reasoning.

    You will need to know the following in order to share the external on the network.

    * where the external drive is mounted to by doing sudo mount -v or use the GUI program Disk Utility
    * you may need to use the umask to always have 777 permission which will give read, write, and execute/browse.
    * test SAMBA by using the guest only
    * use no encryption during setting up and can enable encryption later

    You have to expect very low performance when sharing an NTFS drive that is connected to Linux. NTFS support in Linux is a user-space type of operation.
     
  12. laclaque

    laclaque Thread Starter

    Joined:
    Feb 26, 2016
    Messages:
    32
    I have removed linux and reinstalled windows 10 a few days ago. I am not happy with that but it had to be done. I just checked the external drive in win 10 and there is nothing wrong with it.

    Thank you for your time.
     
  13. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1211822

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice