Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
I'm new to this. Can you tell me where i can enter a startup script after a user logon to mount some remote drives. I've got the smbmount to work ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2003
    Posts
    9

    Startup Scripts


    I'm new to this. Can you tell me where i can enter a startup script after a user logon to mount some remote drives. I've got the smbmount to work ok but I would like to automate it

    While I'm on the subject, how can I start up two Gnomes sessions under different users?
    Regards

  2. #2
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    You can add this to the users .bash_profile that will be executed every time the user logs on. But its better to mount drives/filesystems from /etc/fstab then the drives will automaticly be mounted after a reboot for example...your aother filesystems and mounts already exists in that file..

    Regards
    Regards

    Andutt

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    There are several ways to start up two gnome sessions:
    1. Log in at two different text terminals as the two different users and run startx for both.
    2. Configure to different local X displays for your display manager, and switch between the two VTs to log in at both.
    3. If you have GNOME 2.2, you can start a slave gdm once you're logged in, much like WinXP's user switching thing.

  4. #4
    Just Joined!
    Join Date
    Jun 2003
    Posts
    9
    Thank you both very much. Still a few problems with the mount.
    /etc/fstab doesn't seem to like the file type smbfs. At lleast I think that is what its complaining about. (Redhat v9). The other option of using .bash_profile complains that mount requires root permissions to execute.

    Any thoughts?
    Regards

  5. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    You must set "set uid or set gid" so that normal users gets granted to mount shares... but setuid and set gid are a potential security risc. BUt if you want to do that you do like this...

    Code:
    chmod u+s /usr/sbin/smbmount
    Then your file will look like this..

    -rwsr-xr-x 1 root root 504056 Mar 14 02:28 /usr/bin/smbmount

    with a little s on it....Now try to mount as a normal user..

    Regards
    Regards

    Andutt

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    How does it complain about your fstab entry, and what did your entry look like?

  7. #7
    Just Joined!
    Join Date
    Jun 2003
    Posts
    9
    Thank you both again. Slow progress but nearly there...
    I now have fstab working with smbfs. I am mounting two remote filesystems. However one of them will not mount with write access for the main directory (although the files within it have write access for owners). I suspect this is a winXP problem to which it is connecting but I have even gone as far as setting the server directory rights under XP to 'full access' for 'everyone' whiich I'm guessing is equivilent to Linux 777 but I still get a mounted directory rights of 555. I have tried the dmask option at both 000 and 777 (not sure if it inverts like umask) but no changes. I'm so close and very much appreciate your help.
    Regards

    PS smbmount locks up on startup somtimes - anything i should be worried about?

  8. #8
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    You probably have to mount the hdd in read/write mode... like this..

    Code:
    mount -t vfat /mnt/windows user,uid=500,gid=500 0 0 
    mount -t ntfs /mnt/windows user,uid=500,gid=500 0 0
    Regards
    Regards

    Andutt

  9. #9
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Andutt, that just looks like a confused mix between mount and fstab. Also, wasn't this about SMB?
    Anyway, the problem might be that WinXP isn't allowing write permission for the guest account no matter what permissions you actually set it to. Try using an alternate username to connect with, but using with username and password mount options, like this:
    Code:
    //node/share /mnt/smb smbfs rw,auto,username=someuser,password=secret 0 0

  10. #10
    Just Joined!
    Join Date
    Jun 2003
    Posts
    9
    Thanks again - the problem turned out to be on the winXP end. Not sure exactly what it was but by changing to a new directory, setting permissions, and copying the contents I was able to get it working.

    I do however get a lockup 4 times aout of 5 during linux startup as it attempts to do the smbmount. It just hangs - no error message. Any ideas of where to start looking?
    Regards

Page 1 of 2 1 2 LastLast

Posting Permissions

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