how to execute automatically a program/script after login
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm not too sure which "logon" you want to refer to...
Shell logon, samba logon, domain logon etc
If you want to mount a user's files as shares for other people to use, after they have connected to Samba, you can use the preexec and postexec functions in samba..
They are used to mount cdroms once someone browses the share, and remove the mount when they exit, but they can of course mount other things as well...
You can also run them as root using root preexec & root postexec
Give them an individual share to browse first then personalise the mount.
Make the mount directory one below the share directory so they can see all the possible mounts.
Last edited by peter_robb; 12-12-2003 at 04:29 PM.
i placed a script called mount.sh in /etc/profile.d. I had to do someworkaround, as at this location, the system reloads this script at eachcall of bash or nautilus.My script is as followed:
more /etc/mtab | grep smbfs > /home/$USER/EOFile
read ende < /home/$USER/EOFile
if [ "$ende" = "" ]; then
sudo mount -t smbfs -o credentials=/home/$USER/.credentials,uid=$USER,gid=grosswiler,fmask=777,dmask=777,rw //morpheus/$USER /home/$USER/winpriv
sudo mount -t smbfs
...and this works...somehow....
Location: United States of America and damn proud of it!
Distribution: Windows 7 prior Red Hat User
I read your dilemma. I had a similiar situation some time ago and this is what I read about in a huge samba book I bought. Have the windows boxes connect via network drives. You can do that with the Net Use command in the windows command prompt. Make certain to put in there persistent:yes to make certain the network drives will initalize at start up. Also, you can set your permissions file and folder specific should you wish.
I don't know if this is what you're looking for, but I thought it might help. Take care and good luck!
Thanks for your idea. But the Window-Boxex are no problem. i put there a login-script into the netlogon-share. This is executed, as a Windows-Client authenticates itself on the samba-domain. WINDOWS MACHINES ARE NO PROBLEM! a sad fact, as i have more linux-clients...
if you want to, i send you my login.bat placed in the netlogon-share of my samba-server, perhaps this helps you also a little bit....always appreciated to help people trying to help me!!
this is no problem, scott, just a few more minutes of engagement for the installation, but extra for a network at home with several clients....the samba-pdc (i have samba version 3.0.x) is very reliable and some magazine say even quicker than windows 2003. at least: no cost for licenses on the server....