LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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.

Notices


Reply
  Search this Thread
Old 06-12-2006, 08:54 AM   #1
Lotharster
Member
 
Registered: Nov 2005
Posts: 144

Rep: Reputation: 18
Question run script during login


I want to make a script that runs everytime a user logs in. I need that to mount the user's home-directory (which is encrypted), so the scipt should run _before_ the home directory is accessed. How can I accomplish this?

Writing the actual script should be no problem, I'm just wondering how get it to execute everytime someone logs in.

Regards,

Lotharster
 
Old 06-12-2006, 09:23 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
What about you put that in fstab?
 
Old 06-12-2006, 09:26 AM   #3
Lotharster
Member
 
Registered: Nov 2005
Posts: 144

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by Agrouf
What about you put that in fstab?
In that case I would have to enter the keys everytime I start my computer, hich is not what I want. I want to have several user accounts on the machine, some of them with encrypted home, some without.
Of course I could manually mount the partition everytime I want to login, but that is not very practical.

I'm sure there is some other way.
 
Old 06-12-2006, 09:40 AM   #4
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
I didn't really get what you want, but usually startup scripts are in /etc/rc.d or /etc/init.d
If you want a startup script in the home of the user which is started at login, you have a .bash_profile in $HOME, but that's not what you want.
What is your distro?
What will your script do?

Last edited by Agrouf; 06-12-2006 at 09:42 AM.
 
Old 06-12-2006, 09:45 AM   #5
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
Wait I get it.
I don't know a simple way to do it, but you could ln the su command and do your script before you do the actual su.

Last edited by Agrouf; 06-12-2006 at 09:51 AM.
 
Old 06-12-2006, 02:34 PM   #6
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
I thought this was an interesting question. Another suggestion (do not if it would work)

less /etc/kde/kdm/kdmrc
# Specify greeter plugins that can be used to obtain authentication data.
# This can be a plugin's base name (expands to $kde_modulesdir/kgreet_$base)
# or a full pathname. Default is classic
#PluginsLogin=sign
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Bash Script @ login XaViaR Linux - General 5 01-26-2006 10:05 PM
how do i make a script run on login? roseplant SUSE / openSUSE 11 01-24-2006 04:09 PM
run a script once at login? masand Linux - Software 4 05-02-2004 09:41 AM
Run script at login instead of bash uzi4u Linux - General 2 04-28-2004 02:31 PM
run a script once at login? shanenin Linux - Software 2 04-25-2004 10:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:51 PM.

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