Accessing Windows share in Linux

There are several ways to do this. One is GUI-based. In Fedora Core, use the Places menu in the top panel. Within this menu item, click the ‘Connect to Server…’ sub-menu. This will popup the Connect to Server dialog box shown below.

Connect to Server

In the Service type, select Windows share. Then enter the Windows server name in the Server text field. You can also fill in the other optional information, such as the Share, Folder, User Name, and Domain Name fields. After providing the needed information, click the Connect button. If the share requires a password, you will be prompted to enter one in a dialog box shown below:

Password

Enter the password and select how long will you want the password to last, then click Connect. If successful, you will be connected to the specified Windows share. If not, an error will occur. Check if all the specified information are correct. Consult your system admin if you don’t know some of the required information.

The other alternative is to automount the share every time you login. To do this, you need root permission in your Linux system. First, create the directory where you want to mount the share (e.g., in /mnt/windows):

[root@mycomp] mkdir /mnt/windows

Then edit the /etc/fstab file and add the following lines.

//myserver/myshare   /mnt/windows   cifs   username=myname,password=mypass,uid=myuid,gid=mygid 0 0

Replace myname and mypass with the actual username and password for your Windows share, and myuid and mygid with the actual Linux user id (or username) and group id. You can also specify a full path to myserver, say, //myserver.mywindows.com/. Save fstab. Type

[root@mycomp] mount /mnt/windows

in your shell to immediately mount the share. If this works, the next time you login, the share will be automatically mounted.

That’s it. Have questions, drop a comment below.

 

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.