LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-16-2005, 10:29 AM   #1
MediMania
LQ Newbie
 
Registered: Oct 2004
Location: Morocco
Distribution: FC 4
Posts: 11

Rep: Reputation: 0
Unhappy automatic Mounting Windows Share using samba


Hi All,

As every newbie, I spent a LOT of Time setting-up Samba 3....& it finally works on kernel v2.6. Im using samba Now I can browse my win2k3 shares & also mount then using:
# mount -t cifs -o username=Myuser,password=Mypass //win2k3_server/share //mnt/windows

my requirements are to enable automatic mounts my users' shares from Win2k3 at logon time, & umount them at logout...

I found a lot of thing things about that on the internet. however, most of the doc assume the Samba server running as a PDC, which IS NOT MY CASE. therefore, poor me have NO CLUE where to start.

Can anyone PLEASE provide the newbie that I am with some Howto or step-by-step to configure samba [netlogon] & scripts.

Thx a lot
below is my smb.conf file:
#================ Global Settings =====================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = medi
netbios name = LinuxMachine
winbind separator = :
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind uid = 10000-20000
winbind gid = 10000-20000
winbind enunm users = yes
winbind enunm groups = yes
template homedir = /home/%D/ %U
template shell = /bin/bash
winbind usedefault domain = yes
client use spnego = yes
unix extensions = yes
case sensitive = yes
delete readonly = yes
server string = Samba Server
security = ADS
encrypt passwords = yes
realm = medi.com
smb passwd file = /etc/samba/smbpasswd
# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U

#================ Share Definitions =====================
[homes]
comment = Home Directories
browseable = no
writeable = yes
valid users = %S
create mode = 0664
directory mode = 0775


[netlogon]
; comment = Network Logon Service
: path = /usr/local/samba/lib/netlogon
; guest ok = yes
: writable = no
; share modes = no

;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes

[shared]
path = /home/shared
writeable = yes
guest ok = yes

[medi]
path = /home/medi
writeable = yes


Peace
 
Old 11-16-2005, 10:41 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Is this for you personally on a single machine, or do you want scripts setup to mount the appropriate shares depending on which user logs in to the network? If it's just you on the local machine, set it up in /etc/fstab, with your login credentials in something like /etc/credentials to enable automatic mounting on boot.
 
Old 11-16-2005, 10:48 AM   #3
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
I have a detailed howto posted at:

http://kim.biyn.com/Linux/how_to_mou...time_via_fstab

Sorry about the formatting on that howto - I've been swamped with working on opening two stores.
 
Old 11-16-2005, 06:20 PM   #4
sjr
Member
 
Registered: Oct 2002
Location: Maryland
Distribution: SUSE 10.1 and 10.2
Posts: 44

Rep: Reputation: 15
Quote:
Originally posted by fouldsy
Is this for you personally on a single machine, or do you want scripts setup to mount the appropriate shares depending on which user logs in to the network? If it's just you on the local machine, set it up in /etc/fstab, with your login credentials in something like /etc/credentials to enable automatic mounting on boot.
You can still use the credentials method for multiple users; just put ALL the shares in fstab with the appropriate credentials files in the users' home directories. You may also want to user the uid, gid, dmask and fmask options to make sure that only the appropriate user can access the mounted shares.
 
Old 11-17-2005, 04:54 AM   #5
MediMania
LQ Newbie
 
Registered: Oct 2004
Location: Morocco
Distribution: FC 4
Posts: 11

Original Poster
Rep: Reputation: 0
ok, this is the situation (& sorry for ommiting on 1st post):

I have more than 1000 users, & everyone has its own share in the Active Directory. Users connect either via a windows Station or a Linux Box.... Users also come & Go
What I need is a Way to use Sama Wildcard, especially the %U, because I don't want to be modifing /etc/fstab everytime a new user is created at the level of the AD. Having a single script or file that map users to their share & mount them at logon time (& umount them @ logout) would be an optimal solution, the solution.

I read somewhere about a script called "genlogon", a perl script that generate logons credentials (or smt alike) on the fly

Wishin everyone a nice day; & while waiting for ur answer, I'll fighting against a weird spyware or virus or I_Really_Dont_wanna_know_what that attacked my ad this morning & that is killin the explorer process every 10 sec

LoL
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mounting Windows Network Share via Samba colabus Linux - Software 11 12-08-2008 02:52 AM
mounting a windows (samba) share? alsjordan Linux - Newbie 3 08-06-2005 09:22 AM
Mounting Windows Network Share via Samba colabus Linux - Newbie 6 10-12-2004 09:15 PM
automatic mounting of windows partitions vijeesh_ep Linux - Networking 1 07-31-2004 02:05 PM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:04 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