Fedora Linux Support Community & Resources Center
  #1  
Old 28th January 2009, 03:46 PM
iinfi Offline
Registered User
 
Join Date: Jan 2009
Posts: 25
Question map windows drives on linux

hi all,

i m in a fix. i have a windows file server and a windows AD domain controller.
all windows workstation users are able to log in to their workstations authenticated by Windows DC and also shared drives on the file server mapped with logon scripts.

now i m creating linux workstations and have been successful in adding the linux machines to the domain and users are authenticated from the windows DC.
now comes the question of mapping the shared drives for each user.
the script on the windows DC is as below
Code:
NET USE G: \\172.16.2.2\FINANCE

NET USE G: \\172.16.2.2\AUDIT
for each user the script is different and users sit on any workstation.
is their any way Linux can be made to understand this script and drives be mapped for users?

thanks
Reply With Quote
  #2  
Old 28th January 2009, 03:57 PM
notageek's Avatar
notageek Offline
Registered User
 
Join Date: Jan 2008
Location: New Delhi, India
Posts: 2,068
Hi

I'm not sure If I understood you correctly, assuming that I have, you can access windows shares in Linux with smbclient, usually with the following syntax

Code:
smbclient //server/service -U username
Please see "man smbclient" for more details. You can also auto mount samba (Windows) shares automatically.

Maybe this link will help you:
http://www.jejik.com/articles/2007/0...res_with_cifs/
Reply With Quote
  #3  
Old 28th January 2009, 04:12 PM
wathek Offline
Registered User
 
Join Date: Jan 2009
Posts: 49
you've to use smbclient to browse the shares of the clients for example smbclient -L //192.168.1.1
and to mount a samba share you'll have to use mount like this mount -t cifs //192.168.1.1/share /mount/point -o username=user,password=pass

you'll find more information in the man

Linux Archive

Last edited by wathek; 9th February 2009 at 03:00 PM.
Reply With Quote
  #4  
Old 28th January 2009, 06:02 PM
iinfi Offline
Registered User
 
Join Date: Jan 2009
Posts: 25
thanks for the response.
well the point is, i know to use the smbclient command and map/mount the drive but the issue lies in converting the scripts for each user which runs from Windows Ad and then run them on the linux machine so that proper drives are mapped for each user and mounted.
further when i run the mount command as a user
Code:
[test@lin3 ~]$ mount -t cifs //192.168.5.211/arvind /drive/ -o username=test
mount: only root can do that
is there any way this shared drive on the server can be mounted jus whn the user logs in?
Reply With Quote
  #5  
Old 28th January 2009, 06:26 PM
Mariano Suárez-
Guest
 
Posts: n/a
Instead of converting the windows scripts to something that will run on a linux box, store the actual information in a good ol' plain text file and build *both* scripts from that.
Reply With Quote
  #6  
Old 28th January 2009, 06:35 PM
asqwerty's Avatar
asqwerty Offline
Registered User
 
Join Date: Dec 2008
Location: Madrid, Spain
Posts: 29
I think you could use pmount or fuse
Reply With Quote
  #7  
Old 29th January 2009, 02:06 AM
iinfi Offline
Registered User
 
Join Date: Jan 2009
Posts: 25
thank you all,
i will chk how pmount n fuse wud wrk

@Mariano: our client's windows machines and Windows DC are already setup and running for ages. so storing everything in plain text and converting is not possible as that wud mean changing the whole lot of scripts at the server. thanks anyway
Reply With Quote
  #8  
Old 29th January 2009, 01:47 PM
Mariano Suárez-
Guest
 
Posts: n/a
The other option, which is to get the scripts you already have, and construct from them the ones you'll be using in linux, is exactly the same thing but much more complicated.
Reply With Quote
  #9  
Old 14th February 2009, 07:44 AM
iinfi Offline
Registered User
 
Join Date: Jan 2009
Posts: 25
sorry for not getting back for almost 10 days.
btw. is there any way for us to determine where the windows ad logon scripts have been stored in Linux.
i mean, as soon as the linux user is authenticated the logon scripts are sent to the client machine. on windows they run fine, but on linux i feel they mite be stored somewhere which i can write a script or something as root user and have the drives mapped for users in real-time.

is that the right way?
i v tried using pam_mount. but again the issue is the user is locked to a workstation as the scripts are stored on the linux desktop. a user moving to another machine will not have the shares mapped. we are looking at migrating 300 odd windows workstation users migrating to linux. so not feasible to implement.

thanks for your help everyone. any other suggestions

Last edited by iinfi; 14th February 2009 at 07:47 AM.
Reply With Quote
  #10  
Old 14th February 2009, 11:37 PM
jbkt23 Offline
Registered User
 
Join Date: Mar 2006
Posts: 510
/sbin/mount.cifs is the command you want to use to map the drives. For the users to us it to mount drives you need to make it set UID by:
chmod u+s /sbin/mount.cifs

you want to do the same for /sbin/umount.cifs

Here is a link to a thread that covers some of what you want or at least will give you some ideas to get what you need.

http://forums.fedoraforum.org/showthread.php?t=210927

The one problem that you will encounter is that every time samba is updated on the linux hosts you will have to go back and re-chmod u+s the mount utilities above. It may be possible to copy these commands to some place like /usr/local/sbin/. If you do, then each user script will have to have the full path to the command so that it isn't confused with the original.

good luck
__________________
jbkt23
Reply With Quote
  #11  
Old 15th February 2009, 12:35 PM
iinfi Offline
Registered User
 
Join Date: Jan 2009
Posts: 25
i need the windows ad authenticated users to be able to mount on the root drive.

i.e /mnt or a another directory which i may create /home/DOMAIN/mnt

the /sbin/mount.cifs command allows me to mount shared directories only on my home dir.

is there any way i can allow users to mount shares from file server on a directory other than the home directory

/sbin/mount.cifs //192.168.5.212/home/user3 /home/CAT/mnt/ -o rw,user=user3
mount error: permission denied or not superuser and mount.cifs not installed SUID

abv is the error i get. the mount.cifs runs ok if i have the users create mounts on their home dirs.

plz help

i am planning to store the pam_mount.conf file in a mounted drive for each user (create symbolic link from /etc/security/pam_mount.conf to the mounted shared drive specific for each user)

for that i need the users to be able to mount on a common drive ...
Reply With Quote
  #12  
Old 15th February 2009, 10:00 PM
Mariano Suárez-
Guest
 
Posts: n/a
Is it that much effort to write complete words like "above"and "please"? You are not a 13 year old sending text messages to their friends, after all, no?

Why are you panning to have one pam_mount.conf file per user? The file allows you to give
the configuration for all users in one place...
Reply With Quote
  #13  
Old 16th February 2009, 01:34 AM
iinfi Offline
Registered User
 
Join Date: Jan 2009
Posts: 25
the short sms like words have taken over corporate email communications as well these days. since they are used often i used them. apologies if you felt offended in any way.


coming to the topic. we are looking to migrate 300 odd users in the first phase and more later. its not feasible to write the same pam_mount.conf. the client wants a centralized management system for each user. hence the trouble. do you have any other suggestion.
Reply With Quote
  #14  
Old 16th February 2009, 02:18 AM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Just a note. Forum rules specifically mention that one should not use text speak.

(Not to side track the thread, but it's generally frowned upon and will often cause people to not offer help because they find it so annoying.)

While this seems unreasonable to some people, I have noted that 99 percent of the folks who use it don't have English as their first language (though, sad to say for American education, they usually write better than native speakers) and sometimes don't understand the nuance of how it's considered somewhat rude on forums like this.

I realize you've already apologized and stopped doing it, but I just thought it worthwhile to add the explanation for others who come across this thread in passing.

Now, back to the regularly scheduled program.
Have you looked at the samba wiki? It has a section on using samba with AD. (Last time I looked, though, it was aimed in the opposite direction, letting Windows users access a Linux server.)

I wonder if sudo might work for this? I never ran into this exact situation, in our case, it's the other way around, having Windows users access shared Linux drives.

(I haven't gone through the samba howtos either, I wonder if there might be something in there, but you've probably already looked.)
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #15  
Old 16th February 2009, 05:53 AM
iinfi Offline
Registered User
 
Join Date: Jan 2009
Posts: 25
i have looked at the samba and such stuff before. but didnt find anything interesting.
mapping drives on a linux machine is not an issue. being able to manage it from a central system is a pain in the neck. its almost 4 weeks since i first started to try a workaround for this. still trying..

we are so much used to the lingo that typing like this seems odd. never mind will try my best to follow it.
Reply With Quote
Reply

Tags
drives, linux, map, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I view my Windows drives laurie Using Fedora 1 8th June 2008 07:21 AM
Can't see drives on Windows network and can't see Linux PC with Samba Karmaflute Using Fedora 3 23rd May 2008 08:42 AM
How to chain proxies linux:linux:windows without ssh server on windows? vcguy Servers & Networking 0 13th April 2008 01:03 PM
Linux install, two hard drives, one windows xp... bigred Installation and Live Media 1 18th November 2005 06:44 PM
Sharing Drives between Linux and Windows enigm4 Hardware & Laptops 14 13th September 2004 02:51 AM


Current GMT-time: 03:53 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat