Monday, April 21, 2008

How to mount windows shared network drive as linux directory

My development environment in office is CentOS and quite often I have to access a windows network share directory. I hate to open nautilus samba file system access every time to copy/paste into those directory. I can't use my bash console to do that. After some googling, I mounted the windows network share folder to my /home/sajid/team_members directory with this command:


mount -t smbfs -o username=sajid,password=sajid //fileserver/team_members /home/sajid/team_members


Here the username/password is my userid password to access the shared network drive, "//fileserver/team_members" is the location of the network directory.

Now that I could mount the network folder to my local drive, I wanted to automate this task every time I started my computer. So, I added this line to my /etc/fstab file.


//fileserver/team_members /home/sajid/team_members smbfs username=sajid,password=sajid 0 0


So from now on, I can use the network drive just as my local filesystem. Now that I have it fixed, I have to be extra careful not to do rm -rf /home/sajid/team_members/.. ;)

9 comments:

Anonymous said...

Your site is nearly impossible to read (black background), so I'll look elsewhere.

Anonymous said...

easy to read for me... thanks!

Anonymous said...

I guess the grumbler about the black background wasn't smart enough to use firefox and set his own colors in the tools>options>colors tab...

I, too, can barely read white on black pages...but red on black is the absolute worst....Anyway,
I just view your valuable info the way I want to view it...

Thanks...
Jim

Anonymous said...

When ever I come across a site I cant read, Ctrl+A to select all and the contrast it makes usually makes a difference :D

Weparo said...

Hey, thanks for your instructions, works great. I don't know why everybody is bitching about the site design, but I like it and can read it. And if your not able to set up firefox correctly, i don't see what you do here anyways...

Anonymous said...

Good idea... but my nb tells me "unknown filesystem type smbfs" so i need something else...

Anonymous said...

Thanks. worked great with my uni network

Anonymous said...

nice, only thing I wouldn't do is put my password in plain text in there. I'd just enter at the time it got mounted.

Thanks.

Anonymous said...

Do you realy think this is his real password? I don't!