writable protected file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users writable protected file
# 1  
Old 10-28-2008
writable protected file

Greetings

I am trying to create a solution that will log information into a file. That is the easy part.

What I am trying to do is have a front end script that ill ask a user what their reasoning is for logging in and log that reason into a file. The hard part I am finding is that I need that file to be such that the user can not modify it.

My first thought is that if the file can be written to then it can be modified but I wanted to ask here to see if this is possible.
# 2  
Old 10-28-2008
Not sure I understand.

What do you mean by reason should be logged but user should not be able to modify that ?

One thing that I could think of is,
run the logging script as a different user - then its done
# 3  
Old 10-28-2008
When a user logs in, there is a script that is run which prompts for a reason that they are logging in. That reason should then be logged in a file that is "protected". So that it can not be modified.
# 4  
Old 10-28-2008
More:
How will the front end script be called?
If the user can find out and look at it, he will know the name of the logfile... and yes if you can write to it you can modify it...
# 5  
Old 10-28-2008
The script is called via exec with traps from the user's .profile.
# 6  
Old 10-28-2008
You could simply use the "logger" command with an appropriate priority in the script and use syslog to handle the logging part. That should resolve the issue you are having.
# 7  
Old 10-28-2008
Quote:
Originally Posted by reborg
You could simply use the "logger" command with an appropriate priority in the script and use syslog to handle the logging part. That should resolve the issue you are having.
hmmmm good lead, however it will only log to the syslog. Would be perfect if I could specify a file to write the message to.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Opening up ZFS pool as writable

I have installed FreeBSD onto a raw image file using QEMU Emulator successfully. I have formatted the image file using the ZFS file system (ZFS POOL). Using the following commands below I have successfully mounted the image file ready to be opened by zpool sudo losetup /dev/loop0 .img sudo... (1 Reply)
Discussion started by: alphatron150
1 Replies

2. Shell Programming and Scripting

Password protected excel file without encryption or zipping

All, I have requirement to send password protected excel file in an email from unix/linux box without zipping it. Any help would be appreciated. Thanks.. (8 Replies)
Discussion started by: Durgesh Gupta
8 Replies

3. Post Here to Contact Site Administrators and Moderators

Password protected excel file without encryption or zipping

All, I have requirement to send password protected excel file in an email from unix/linux box without zipping it. Any help would be appreciated. Thanks.. (1 Reply)
Discussion started by: Durgesh Gupta
1 Replies

4. Red Hat

Related to "NAS" some file system (mounted volumes) were not writable

Dear friends, I have been facing an issue with one of my red hat unix machine, suddenly lost to switch sudo users. My all colleagues lost to switch to access sudo users. Then, we have realized its related to NAS issue which does not allowing to write the file. because of this we got so many... (1 Reply)
Discussion started by: Chand
1 Replies

5. Shell Programming and Scripting

World writable home dirs

what is wrong with this script? I get: ./perm.sh: command substitution: line 21: unexpected EOF while looking for matching `"' ./perm.sh: command substitution: line 22: syntax error: unexpected end of file Script: #!/bin/bash for dir in `/bin/cat /etc/passwd | /bin/egrep -v... (4 Replies)
Discussion started by: greenja9
4 Replies

6. UNIX for Dummies Questions & Answers

How to download file protected by image captcha from command line?

Hello, any way to download file from image captcha download protected website? The download link is not static but session based, generated. I can do also via web browser, but i trust rather command line, maybe im wrong (1 Reply)
Discussion started by: postcd
1 Replies

7. Solaris

/dev/null not writable

Hi, after a server (solaris 10) got rebooted, Im faced with the problem that in one of my zones (whole zone) /dev/null is only writeable for root crw-r--r-- 1 root sys 13, 2 Jul 8 10:16 /dev/null Unfortunatly chmod didnt help at this point and since its a productive system I dont... (11 Replies)
Discussion started by: bin-doph
11 Replies

8. HP-UX

Lpadmin(1M) rejects devices writable by lp

When we executed a lpadmin command, the following error was output. # lpadmin -phsaprinter -v/home/hoge/lpfile -mrmodel -ocmrcmodel -osmrsmodel -ormhsaprinter -orphsaprinter lpadmin: can't access file "/home/hoge/lpfile" /home/hoge/lpfile is the file other user made. The... (1 Reply)
Discussion started by: madhurtripathi
1 Replies

9. UNIX for Advanced & Expert Users

Problem in converting password protected excel file to csv file in unix

I need to convert a password protected excel file which will be in UNIX server to a comma separated file. For this I need to open the excel file in UNIX box but the UNIX box doesn't prompt for password instead it is opened in an encrypted manner. I could manually ftp the excel file to local... (2 Replies)
Discussion started by: Devivish
2 Replies
Login or Register to Ask a Question