LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2012, 08:26 AM   #1
vm_devadas
Member
 
Registered: Sep 2006
Location: India
Distribution: Redhat and Suse
Posts: 75

Rep: Reputation: 15
chattr and symbolic link


A SLES11 box having custom setup where .profile is a symlink to a central application script. How to prevent users from deleting the .profile file. "chattr +i .profile" will be a quick n easy fix; but it cant be done on symlink, right?
Do you have any easy method to implement this?
 
Old 05-31-2012, 06:51 PM   #2
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
Is there any reason the User's .profile could not be a simple script which merely executes the central application script?
 
Old 05-31-2012, 09:02 PM   #3
em31amit
Member
 
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
if users are login from ssh, you can force them to execute ".profile" or either create a script which loads this profile and make that script as a user shell. so that user's are force to load it.


SHELL SCRIPT SOMETHING LIKE THIS
Code:
cat newshell.sh

#!/bin/bash
source profile/file/path
change user shell to it.


Code:
chsh -s /path/to/new/shell USERNAME
make sure about the execute permission on new shell script.
 
  


Reply

Tags
chattr, symlinks



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
symbolic link not allowed or link target not accessible paullaubscher Linux - Newbie 4 03-10-2010 06:47 AM
symbolic link manolakis Linux - Newbie 1 05-08-2008 07:40 PM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
symbolic link ilnli Slackware 6 01-04-2005 05:05 PM
help with a symbolic link mykrob Linux - Software 6 11-22-2004 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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