Thursday, February 2, 2012

Mount drives into Linux via CIFS

I thought about this blog from Nestor Urquiza. If you are like me, then your Linux servers are like an island in a sea of Windows servers. Here is how you can mount drives without the use of samba.

First, create a directory: sudo mkdir /mnt/ultralord-logs/

Now, lets try to make the mount:

Here, I am mounting the //ultralord-main/logs with the username "gandalf" and the domain "ultralord". If the username is only a local user (not in the domain), then the domain will be the name of the computer "domain=ultralord-main".

Now, check if the mount was valid by doing: ls -l /mnt/ultralord-logs

I always recommend to setup a credential file to hide the username and password.

If you are able to see logs in the directory, then you are ready to edit the /etc/fstab so that the mount happens automatically.

If when trying to mount a drive you get the following:

The solution is to install smbfs

No comments:

Post a Comment