LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-19-2010, 08:36 AM   #1
iregk
LQ Newbie
 
Registered: Sep 2010
Posts: 5

Rep: Reputation: 0
Mount windows directory as non route user


Hi all,

Having a problem that I've googled to death and can't find a way around it. Here is the situation.

I've a redhat server and a windows 2003 server. The windows box has a shared directory on it that I want to mount on the linux box. This I can do no problem using the following command:

mount -t cifs -o username=windowsuid,password=mypass //winservername/directory /mnt/directory

This all works perfectly however I need to mount this as a non root user. This is where I'm having difficult. I constantly run into "only root can do that".

I've edited the fstab and added the entry in there for the mount with the flag user or users and neither makes a difference. I've also tried editing the sudoers file and still the same.

Any ideas? I can add the user in question into pretty much every group however that essentially makes him a root user which is not what I want to do.
 
Old 09-19-2010, 09:43 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
Try this:
Code:
mount -t cifs -o uid=<non_root_uid> ...
 
Old 09-19-2010, 10:49 AM   #3
iregk
LQ Newbie
 
Registered: Sep 2010
Posts: 5

Original Poster
Rep: Reputation: 0
yeah, tried that one as well. no joy either
 
Old 09-19-2010, 06:20 PM   #4
avalosdanielr
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 0
This is working for me, allowing to mount a windows 7 share:

sudo /sbin/mount.cifs //winserverip/share /mountpoint -o username=winadmin,password=windadminpass,iocharset=utf8,file_mode=0777,dir_mode=0777

My distribution is opensuse 11.3
 
Old 09-20-2010, 03:43 AM   #5
iregk
LQ Newbie
 
Registered: Sep 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Gave that uid switch another run and that seems to have done the trick. Thanks all.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount: mount to NFS server '192.168.15.2' failed: System Error: No route to host. mohammedahmed86 Linux - Networking 4 11-05-2009 10:48 AM
How to mount a Windows shared directory and have mount point be owned by nonroot user Arodef Linux - Software 3 09-14-2009 12:23 AM
[SOLVED] Can't connect to windows share, mount error 113 = No route to host jmpetre Linux - Newbie 6 06-23-2009 05:43 PM
how to mount linux directory to windows network keevitaja Linux - Server 1 03-12-2008 04:13 AM
no-root user can not mount a remote nfs directory? xiamw Linux - General 3 12-16-2004 09:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration