08-31-2009
Parameter to avoid file being deleted by SAM
Good afternoon.
I am a newbie.
We just had a potentially big problem (negated to having good backups).
Basically, there is an option in SAM, to delete all the data from the system that a user ever created.
Lo and behold, silly me, I choose that option, and all sorts of needed files get deleted.
Luckily, we have a good backup.
Unfortunately, I would like to avoid this situation in the future.
Is there a way to choose which directories are *blocked* from being cleared by SAM?
I noticed , from checking thesam_remove.log that the "/var" directory was blocked, for example, but I want the same exclusion for other directories. Is that possible?
Thanks!
8 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am having a problem on an HP box, where I am being told that there are too many open files. I am also being told I need to change a SAM file. Could some help me understand what a SAM files is and what it is used for.
Thanks. (2 Replies)
Discussion started by: kristian
2 Replies
2. UNIX for Dummies Questions & Answers
Hi Gurus,
I had a question regarding avoiding duplicates.i have a file abc.txt
abc.txt
-------
READER_1_1_1> HIER_28056 XML Reader: Error occurred while parsing:; line number ; column number
READER_1_3_1> Sun Mar 23 23:52:48 2008
READER_1_3_1> HIER_28056 XML Reader: Error occurred while... (7 Replies)
Discussion started by: pssandeep
7 Replies
3. Shell Programming and Scripting
Hi all.
I want to check the free space on a given FS and process the output. Right now, I'm using a temp file to avoid using df twice. This is what I'm doing
#!/usr/bin/ksh
...
df -k $FS_NAME > $TMP_FILE 2>&1
if ]; then
RESULT="CRITICAL - $(cat $TMP_FILE)"
else
cat $TMP_FILE | ...... (3 Replies)
Discussion started by: fox1212
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
We have a file which needs supper user previleges to delete. There are 10 users having super user preveleges. Some times back that file got deleted. How to know who has deleted that file? (6 Replies)
Discussion started by: siba.s.nayak
6 Replies
5. Programming
Hi,
My Code is as below:
nbECRITS = fwrite(strstr(data->buffer, ";") + 1, sizeof(char), (data->buffsize) - LEN_NOM_FIC, fic_sortie);
fclose(fic_sortie);
sprintf(PATH_BALISE, "%s.balise", PATH);
fic_balise_data = fopen(PATH_BALISE, "a+");
if (fic_balise_data == NULL) {... (1 Reply)
Discussion started by: ezee
1 Replies
6. Shell Programming and Scripting
hi all,
i have a parameter file of following format, i want a method which can get the value of specific parameter.
parameter file format:
<Parameter Name="FileLocationWindows">
<Description>
The directory location of the logger file.
... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies
7. Shell Programming and Scripting
Hello,
I have been working on script in which search and replace the multiple pattern.
1. update_params.sh read the multiple pattern from input file ParamMapping.txt(old_entry|New_entry) and passing this values one by one to change_text.sh
2. change_text.sh read... (0 Replies)
Discussion started by: ketanraut
0 Replies
8. Shell Programming and Scripting
I want to create a file, to save a list of fail2ban blocked ip addresses. So I thought I'd create a loop that will check with fail2ban every minute, and write the ip addresses to a file.
while true; do echo $(fail2ban-client status asterisk-iptables | grep 'IP list' | sed 's/.*://g' | sed -e... (4 Replies)
Discussion started by: aristosv
4 Replies
LEARN ABOUT DEBIAN
chntpw
CHNTPW(8) System Manager's Manual CHNTPW(8)
NAME
chntpw - utility to overwrite Windows NT/2000 SAM passwords
SYNOPSIS
chntpw [options] <samfile> [systemfile] [securityfile] [otherreghive] [...]
DESCRIPTION
This manual page documents briefly the chntpw command. This manual page was written for the Debian distribution because the original pro-
gram does not have a manual page.
chntpw is a utility to view some information and change user passwords in a Windows NT/2000 SAM userdatabase file, usually located at WIN-
DOWSsystem32configSAM on the Windows file system. It is not necessary to know the old passwords to reset them. In addition it contains
a simple registry editor (same size data writes) and hex-editor with which the information contained in a registry file can be browsed and
modified.
OPTIONS
-h Show summary of options.
-u username
Username to change. Default is Administrator
-l List all users in the SAM database.
-i Interactive: list all users (as per -l) and then ask for the user to change.
-e Registry editor with limited capabilities.
-d Use buffer debugger.
-t Show hexdumps of structs/segments (deprecated debug function).
EXAMPLES
ntfs-3g /dev/sda1 /media/win ; cd /media/win/WINDOWS/system32/config/
Mount the Windows file system and enters the directory WINDOWSsystem32config where Windows stores the SAM database.
chntpw SAM system
Opens registry hives SAM and system and change administrator account. This will work even if the name has been changed or it has
been localized (since different language versions of NT use different administrator names).
chntpw -l SAM
Lists the users defined in the SAM registry file.
chntpw -u jabbathehutt SAM
Prompts for password for jabbathehutt and changes it in the SAM registry file, if found (otherwise do nothing).
SEE ALSO
If you are looking for an automated procedure for password recovery, you might look at the bootdisks provided by the upstream author at
http://pogostick.net/~pnh/ntpasswd/
There is more information on how this program works available at /usr/share/doc/chntpw registry works.
AUTHOR
This manual page was written by Javier Fernandez-Sanguino <jfs@computer.org>, for the Debian GNU/Linux system (but may be used by others).
13th March 2010 CHNTPW(8)