Operating System - Linux
1825604 Members
2782 Online
109682 Solutions
New Discussion

map windows drives on linux

 
iinfi1
Super Advisor

map windows drives on linux

hi all,
i m using RHEL5 Client.
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

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
14 REPLIES 14
Heironimus
Honored Contributor

Re: map windows drives on linux

You can mount Windows file shares, but that script is a DOS BAT file. Linux doesn't use "net use" for mounting Windows shares, nor does it map them to drive letters.

My experience is mostly with assigned computers or server-to-server mounts, so I can't offer much advice on the any user/any desktop/different shares situation. However, I think that pam_mount (http://pam-mount.sf.net/) was designed to support that scenario, so I'd start there.
iinfi1
Super Advisor

Re: map windows drives on linux

thank you. i will chhk wat pam is abt
iinfi1
Super Advisor

Re: map windows drives on linux


when i run a yum install pam_mount in either RHEL5 or CentOS 5 i get no thing to do.
i downloaded the pam module package frm the net and ran ./configure
and here is what i get
i m not an expert in linux yet. no way i can get thru this. plz help.

No package 'libHX' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libHX_CFLAGS
and libHX_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

[root@lin2 pam_mount-1.16]#
Rob Leadbeater
Honored Contributor

Re: map windows drives on linux

Hi,

You could also look at the various Samba modules that are (usually) included with RedHat.

smbmount will probably do what you need.

http://www.linux-noob.com/forums/lofiversion/index.php/t1404.html

Hope this helps,

Regards,

Rob
iinfi1
Super Advisor

Re: map windows drives on linux

i m afraid i dont think this wud work as we are looking at arnd 700 odd users who are going to move from windows workstations to linux workstations with the Windows AD authenticating them and scripts written in AD
like
NET USE G: \\172.16.2.2\FINANCE

NET USE G: \\172.16.2.2\AUDIT

mapping/mounting them to the shared drives. Users shared drives may be different and each user has more than one shared drive and this changes for each user.
so adding the mapping lines to each workstations fstab file is not feasible.

am i getting you rite?
Rob Leadbeater
Honored Contributor

Re: map windows drives on linux

Hi,

It should be possible, but will probably need some work/research.

This looks like a good start:

http://oreilly.com/catalog/samba/chapter/book/ch06_06.html

Cheers,

Rob
Rob Leadbeater
Honored Contributor

Re: map windows drives on linux

Maybe not... On closer inspection that looks more like using Samba to replace a Windows server, not the other way around...
iinfi1
Super Advisor

Re: map windows drives on linux

yea .. i m afraid Rob

the steps in ur link wud wrk for a samba DC n win client. :|

do u knw of any other wrkarnd?
Steven E. Protter
Exalted Contributor

Re: map windows drives on linux

Shalom

Use cifsmount or mount -t cifs or set it up in /etc/fstab

//10.0.0.10/web /web cifs credentials=/etc/samba/cred-file,uid=invest,gid=web
#,fmask=0770,dmask=0770 0 0


credentials file includes:

username = username
password = password

With RHEL 4 use mount -t smbfs

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
iinfi1
Super Advisor

Re: map windows drives on linux

hi
the method suggested will not help my case as i am looking to migrate 300 odd windows workstation users to linux workstations and users switching computers. so mounting shares for a user on one PC wud mean he will be stuck to his machine and whn he moves to another machine he will not be able to have the drives on the file server mapped.
the end users are not tech-savvy and there is no way we can ask thm to map the drives themselves using konqueror.

Jus another question

can Wine (if installed on linux workstations) detect these winlogon scripts from AD and map the drives?
Steven E. Protter
Exalted Contributor

Re: map windows drives on linux

Shalom,

No, red hat can not detect and run windows login scripts.

You can either do a start up mount command or this:

//10.0.0.10/web /web cifs credentials=/etc/samba/cred-file,uid=invest,gid=web
#,fmask=0770,dmask=0770 0 0


Change the ip address to something valid or a server name. The above is an /etc/fstab entry.

It will properly mount windows shares.

I also recommend joining the system into the cifs/samba domain.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: map windows drives on linux

I Hit enter before I was doe.

Also note, Linux does not used the limiting windows letter drive system.

All integration should include the path from the server name down to the end of the mount path.

There is a lot you can do.

You can mount the drive with the log in scripts and then have a script parse the login script and issue manual mount commands.

mount -t smbfs ... (RHEL 4 and below)
mount -t cifs ... (RHEL 5)

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
iinfi1
Super Advisor

Re: map windows drives on linux

thank you sir,

i m not good at scripting. i will have to check how i can pull the existing scripts from Windows AD and recode it so that Linux understands them.
Heironimus
Honored Contributor

Re: map windows drives on linux

RHEL4 systems should also use cifs. It's RHEL3 and below that only support smbfs.