Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Mount Windows user share folder at login

  1. #1
    Join Date
    Sep 2007
    Beans
    111

    Mount Windows user share folder at login

    i need to always mount the user share of my Windows server at Ubuntu login.

    Can anyone help me on this please?

    This is my server struture:

    Server
    |-Group1
    | |-user1
    |
    |-Group2
    |-user2


    i’ve found that i need to configure pam mount and i have this example:

    <volume user="user" fstype="smbfs" server="krueger" path="public"
    mountpoint="/home/user/krueger" >

    but i don’t know what to change relative to my server folder struture.

    thanks

    many thanks

  2. #2
    Join Date
    Sep 2007
    Beans
    111

    Re: Mount Windows user share folder at login

    please, any help here?

    every time i login it doesn't happen nothing, nothing is mount and ubuntu doesn't give me any error



    this is my pam.d configurations

    ---------------- /etc/pam.d/common-auth ---------------
    auth [success=2 default=ignore] pam_unix.so nullok_secure
    auth [success=1 default=ignore] pam_lsass.so try_first_pass
    auth requisite pam_deny.so
    auth required pam_permit.so
    auth optional pam_mount.so
    session optional pam_mount.so


    ---------------- /etc/pam.d/common-session -------------
    session [default=1] pam_permit.so
    session requisite pam_deny.so
    session required pam_permit.so
    session required pam_unix.so
    session sufficient pam_lsass.so
    session optional pam_mount.so
    session optional pam_ck_connector.so nox11


    --------------- /etc/pam.d/login ------------------------
    auth optional pam_faildelay.so delay=3000000
    auth required pam_securetty.so
    auth requisite pam_nologin.so
    session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
    session required pam_env.so readenv=1
    session required pam_env.so readenv=1 envfile=/etc/default/locale
    @include common-auth
    auth optional pam_group.so
    session required pam_limits.so
    session optional pam_lastlog.so
    session optional pam_motd.so
    session optional pam_mail.so standard
    @include common-account
    @include common-session
    @include common-password
    session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
    session optional pam_mount.so
    auth optional pam_mount.so try_first_pass


    ----------------- /etc/security/pam_mount.conf.xml ------------------
    <volume
    user="*"
    server="servername.domain.local"
    path="UserShares"
    mountpoint="home"
    fstype="cifs"
    />

    <cifsmount>mount -t cifs //%(SERVER)/%(VOLUME)/%(USER) %(MNTPT)/%(USER) -o "user=%(USER),uid=%(USERUID),gid=%(USERGID)%(befor e=\",\" OPTIONS)"</cifsmount>

    thanks

  3. #3
    Join Date
    Oct 2007
    Beans
    Hidden!

    Re: Mount Windows user share folder at login

    IM pretty sure your server isnt called "servername.domain.local" and the mountpoint where you try to mount it is not a valid path either. It should be something like '/home/yourusername/windows_share'.

    Anyway, there is probably a much easier solution. In the main menu go to Places, then "Connect to server,..", select "Windows share" as service type. Fill out the appropriate fields (server is required, and you probably need to fill out the share name too). Then check the "add bookmark" box and give it a sensible name..

  4. #4
    Join Date
    Sep 2007
    Beans
    111

    Re: Mount Windows user share folder at login

    thanks for replying

    my home path is /home/likewise-open/DOMAIN/user

    and the user is always changing and i need to mount it automatically without specifying the username

    my server name's: SERVER
    my domain: DOMAIN.LOCAL

    Inside the SERVER i have 2 folders group (GROUP1 and GROUP2) and inside them i have USER1 and USER2

    please, can you help on what i need to change in this code:

    <volume
    user="*"
    server="servername.domain.local"
    path="UserShares"
    mountpoint="home"
    fstype="cifs"
    />

    <cifsmount>mount -t cifs //%(SERVER)/%(VOLUME)/%(USER) %(MNTPT)/%(USER) -o "user=%(USER),uid=%(USERUID),gid=%(USERGID)%(b efor e=\",\" OPTIONS)"</cifsmount>


    many thanks once again

  5. #5
    Join Date
    Oct 2007
    Beans
    Hidden!

    Re: Mount Windows user share folder at login

    edit: Im misreading. Let me go over it again. Hang on.
    Last edited by P4man; September 30th, 2010 at 08:53 PM.

  6. #6
    Join Date
    Sep 2007
    Beans
    111

    Re: Mount Windows user share folder at login

    Quote Originally Posted by P4man View Post
    edit: Im misreading. Let me go over it again. Hang on.
    thanks for your help.

    i need this a lot, and after making this working, i will make a tutorial for everyone needing this

  7. #7
    Join Date
    Oct 2007
    Beans
    Hidden!

    Re: Mount Windows user share folder at login

    Im throwing the towel Im afraid. Cant get my head around cfis and too many conflicting resources. I hope someone else chimes in.

    Let me just toss you this thread:
    http://ubuntuforums.org/showthread.php?t=1040514

    I know its a different approach, using fstab, but the info about mounting it verbose to see what happens and perhaps the fact mount.cifs requires 'username' rather than 'user' might apply. I honestly dont know.

    My GUI approach should still work though. If this is for 2 rather than 200 users.

  8. #8
    Join Date
    Sep 2007
    Beans
    111

    Re: Mount Windows user share folder at login

    the main problem of fstab its that i need to make credentials to all users and i have more then 100 users

    i'm lost now

    thanks
    Last edited by guimenez; September 30th, 2010 at 11:15 PM.

  9. #9
    Join Date
    Sep 2007
    Beans
    111

    Re: Mount Windows user share folder at login

    i'm using now this commands in pam_mount.conf.xml

    <volume fstype="cifs" server="SERVER" path="Group1/%(DOMAIN_USER)"

    but always fail to mount

    please, can someone help me?

    thanks

  10. #10
    Join Date
    Sep 2007
    Beans
    111

    Re: Mount Windows user share folder at login

    I've finally found the solution!!!

    the main problem was the server name, i need to put the IP and now it works flawless

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •