How to Lock the Folder/Files in Linux?
Here is the Simple method to lock your files,
#Step 1:
first we change permissions for the folder which we want to protect
Code:
$ sudo chmod a-r /path/to/folder
u have to enter your root password, when prompted ,to run this command
also change the /path/to/folder according to your folder location u wish to lock
#Step 2:
now to create the key!
create an empty file ,and name it as u wish but for this HOW-TO i'm using "protector"
Code:
$ touch .PROTECTOR
the file is created in your home/user/ folder
if u cannot see the file, select "show hidden files" from the View menu or press Ctrl+H , now the file should be visible
#Step 3:
open the file using the text editor and enter the following command>
Code:
$ nano ~/.PROTECTOR
And Paste the following 5 lines in the file.
#!/bin/bash
gksu chmod +r /path/to/folder;
nautilus /path/to/folder;
sleep 1;
sudo chmod a-r /path/to/folder
now save and exit.
#Step 4:
now right click the file > select "properties"> select "permissions" tab> check "Allow executing the file as program"
Or you can set execute permission through Terminal
$ chmod +x ~/.PROTECTOR
#Step 5:
* To create a Launcher in Main Menu, Goto System > Preferences > Main Menu
Click on New Item
Input the correct detail's on dialogue box:
Type : Application
Name : <Name of the Launcher>
Command : /home/username/.PROTECTOR
Comment : Comment to Launcher
And also you can create a launcher on the panel/or Desktop...
The best dressed and the most admired Drag n' drop
Friday, March 5, 2010
Oracle Password Reset
From Oracle FAQ
ORAPWD is a utility used to create a password file for an Oracle Database.
Run orapwd utility before:
* setting REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE|SHARED
* Grant OSDBA/OSOPER to users
Check V$PWFILE_USERS to see who was granted OSDBA/OSOPER access.
[edit] Examples
Create a new password file:
orapwd file=orapwSID password=oracle entries=5
If the password file already exists:
orapwd file=orapwSID password=oracle entries=5 FORCE=Y
The FORCE parameter is available starting from Oracle 10g.
All the latest on four wheels and more Get it now.
ORAPWD is a utility used to create a password file for an Oracle Database.
Run orapwd utility before:
* setting REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE|SHARED
* Grant OSDBA/OSOPER to users
Check V$PWFILE_USERS to see who was granted OSDBA/OSOPER access.
[edit] Examples
Create a new password file:
orapwd file=orapwSID password=oracle entries=5
If the password file already exists:
orapwd file=orapwSID password=oracle entries=5 FORCE=Y
The FORCE parameter is available starting from Oracle 10g.
All the latest on four wheels and more Get it now.
Subscribe to:
Posts (Atom)