Add a new Group in WinXP
Local Users and Groups manages users and groups of users for your computer. You can create new users and groups, add users to groups, remove users from groups, disable user and group accounts, and reset passwords.
Start Menu -> Programs -> Administrative Tools -> Computer Management -> System Tools -> Local Users and Groups -> Groups
Or
Right click on My Computer -> Manage -> System Tools -> Local Users and Groups -> Groups
New Example
Here
Tuesday, November 20, 2007
Sunday, November 11, 2007
Cygwin sshd RSA host key has just been changed
When you get the following errors from SSHD, you'll never be able to connect to your SSHD server.
To fix the problem:
1. Modify .ssh/known_hosts: Remove the line with your_server_ip.
your_server_ip ssh-rsa AAAAB3NzaC1yc2EasdfawAAAIExxVkLHiIpIKDAasdfaxQwUgJ90asdfjoejcxxxkxlKineYdiVb/iZxxxj3yxQf4q2CR8UNuaXJLgmU6G6IrCHtuv0N+xxxyw1cmlRxxx5QEMuYawJmiq87ukcW3zasdfadsffrheF6e7CFwUnD747xxxxxxYN5asdfbcasdfashg5XeymM=
2. bash$ ssh your_id@your_server_ip to try to reconnect to your sshd server.
bash$ ssh your_id@your_server_ip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
xx:d3:xx:61:58:xx:fc:ee:1a:xx:da:9a:xx:42:xx:d1.
Please contact your system administrator.
Add correct host key in /home/your_id/.ssh/known_hosts to get rid of this message.
Offending key in /home/your_id/.ssh/known_hosts:52
RSA host key for your_server_ip has changed and you have requested strict checking.
Host key verification failed.
bash$
To fix the problem:
1. Modify .ssh/known_hosts: Remove the line with your_server_ip.
your_server_ip ssh-rsa AAAAB3NzaC1yc2EasdfawAAAIExxVkLHiIpIKDAasdfaxQwUgJ90asdfjoejcxxxkxlKineYdiVb/iZxxxj3yxQf4q2CR8UNuaXJLgmU6G6IrCHtuv0N+xxxyw1cmlRxxx5QEMuYawJmiq87ukcW3zasdfadsffrheF6e7CFwUnD747xxxxxxYN5asdfbcasdfashg5XeymM=
2. bash$ ssh your_id@your_server_ip to try to reconnect to your sshd server.
Thursday, November 8, 2007
Install cygwin cron via cron-config script
The following was the steps I took to install cygwin cron in WinXP SP2. Note that the value of CYGWIN should be exactly "ntsec", you can't enter "netsec tty". Also, the /etc/passwd and /etc/group should be set to readable to everyone.
bash$ pwd
/usr/bin
bash$ cron-config
Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ntsec smbntsec] ntsec tty
ERROR: Only "[no]ntsec" "[no]smbntsec" "[no]traverse" allowed.
Enter the value of CYGWIN for the daemon: [ntsec smbntsec] ntsec
The service can run either as yourself or under a privileged account.
Running as yourself allows better access to network drives,
but does not allow to run the crontab of other users.
Do you want to the cron daemon to run as yourself? (yes/no) yes
Please enter the password for user 'your_userid': your_password
Reenter: your_password
Running cron_diagnose ...
The file /etc/passwd is not readable by all.
Please run 'chmod +r /etc/passwd'.
The file /etc/group is not readable by all.
Please run 'chmod +r /etc/group'.
There may be serious issues with your environment.
You should look into them and run this script again.
Do you want to continue anyway? (yes/no) no
bash$
bash$ chmod +r /etc/passwd
bash$ chmod +r /etc/group
bash$
bash$ cron-config
Cron is already installed as a service under account your_domain\your_userid.
Do you want to remove or reinstall it? (yes/no) yes
OK. The cron service was removed.
Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ntsec smbntsec] ntsec
The service can run either as yourself or under a privileged account.
Running as yourself allows better access to network drives,
but does not allow to run the crontab of other users.
Do you want to the cron daemon to run as yourself? (yes/no) yes
Please enter the password for user 'your_userid': your_password
Reenter: your_password
Running cron_diagnose ...
WARNING: You do not currently have a crontab file.
... no problem found.
Do you want to start the cron daemon as a service now? (yes/no) yes
OK. The cron daemon is now running.
In case of problem, examine the log file for cron,
/var/log/cron.log, and the Windows event log (using /usr/bin/cronevents)
for information about the problem cron is having.
Examine also any cron.log file in the HOME directory
(or the file specified in MAILTO) and cron related files in /tmp.
If you cannot fix the problem, then report it to cygwin@cygwin.com.
Please run the script /usr/bin/cronbug and ATTACH its output
(the file cronbug.txt) to your e-mail.
Useful <PRE> tag
If you have a text file or a code block and you want to put quickly online and keep it's text format with spaces or tabs. You don't have to go through all the bother of adding and spacing it all out correctly. The easiest solution is to use the <pre></pre> tag which maintains a text format - line breaks and tabs.
You still have to convert the following characters before put the code in <pre></pre> though:
#!/usr/bin/bash
if [ ! $# == 2 ]; then
echo "Usage: $0 <dbuser> <dbpassword>"
exit
fi
You still have to convert the following characters before put the code in <pre></pre> though:
& : & [ & a m p ; a m p ; ]
< : < [ & a m p ; l t ; ]
> : > [ & a m p ; g t ; ]
Thursday, November 1, 2007
CVS Examples
Adding files to a directory
$ mkdir -p foo/bar
$ cp ~/backend.c foo/bar/backend.c
$ cvs add foo
$ cvs add foo/bar
$ cvs add foo/bar/backend.c
$ cvs add backend.c
$ cvs commit -m "Early version. Not yet compilable." backend.c
Removing files
$ cd test
$ rm *.c
$ cvs remove
cvs remove: Removing .
cvs remove: scheduling a.c for removal
cvs remove: scheduling b.c for removal
cvs remove: use 'cvs commit' to remove these files permanently
$ cvs ci -m "Removed unneeded files"
cvs commit: Examining .
cvs commit: Committing .
Remove directories
Removing directory equals to removing files under the directory you want it to be removed. When you checkout the source with a -P option, cvs will remove the empty directory automatically.
Rename a file
$ mv old new
$ cvs remove old
$ cvs add new
$ cvs commit -m "Renamed old to new" old new
$ mkdir -p foo/bar
$ cp ~/backend.c foo/bar/backend.c
$ cvs add foo
$ cvs add foo/bar
$ cvs add foo/bar/backend.c
$ cvs add backend.c
$ cvs commit -m "Early version. Not yet compilable." backend.c
Removing files
$ cd test
$ rm *.c
$ cvs remove
cvs remove: Removing .
cvs remove: scheduling a.c for removal
cvs remove: scheduling b.c for removal
cvs remove: use 'cvs commit' to remove these files permanently
$ cvs ci -m "Removed unneeded files"
cvs commit: Examining .
cvs commit: Committing .
Remove directories
Removing directory equals to removing files under the directory you want it to be removed. When you checkout the source with a -P option, cvs will remove the empty directory automatically.
Rename a file
$ mv old new
$ cvs remove old
$ cvs add new
$ cvs commit -m "Renamed old to new" old new
Tuesday, October 30, 2007
Html examples
How to put code into blog?
Use <PRE> tag. Sample here:
Table examples
Scroll Box Sample
Use <PRE> tag. Sample here:
myClassPath=".;"
for i in `ls ./lib/*`; do
case $environment in
FIX) myClassPath="$myClassPath"":$i"
;;
*) myClassPath="$myClassPath"";$i"
;;
esac
done
Table examples
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="60%" align="left" valign="top">TestMe</td>
<td width="40%" align="right" valign="top"> </td>
</tr>
<tr colspan="2">
<td>COLSPAN</td>
</tr>
</table>
Scroll Box Sample
<div style="border: 1px solid rgb(170, 170, 170); overflow: auto; width: 350px; height: 100px; color: rgb(0, 0, 0);"><p>
your html code here.
</p>
</div>
Monday, October 29, 2007
Cygwin examples
Cygwin SSHD errors with RSA hostkey been changed:
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. Click here for details.
Install cygwin cron
Get cron package from Admin group. Download cron from http://mirror.mcs.anl.gov and store it to your local drive. And then run /usr/bin/cron-config to setup cron daemon. Click here for details.
Cygwin path to Windows path
$ cygpath -wp /home/oneuser/testdir
c:\cygwin\home\oneuser\testdir
Executing Java Program from Cygwin (bash shell script)
$ java -classpath `cygpath -wp $CLASSPATH` [classname] [arguments]
Uninstall Cygwin
source
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. Click here for details.
Install cygwin cron
Get cron package from Admin group. Download cron from http://mirror.mcs.anl.gov and store it to your local drive. And then run /usr/bin/cron-config to setup cron daemon. Click here for details.
crontab -a filename Install filename as your crontab file.
On many systems, this command is
executed simply as crontab filename
(i.e., without the -a option).
crontab -e Edit your crontab file, or create one if it
doesn't already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file.
(This option is available on only a few systems.)
crontab -u user Used in conjunction with other options, this
option allows you to modify or view the crontab
file of user. When available, only administrators
can use this option.
Cygwin path to Windows path
$ cygpath -wp /home/oneuser/testdir
c:\cygwin\home\oneuser\testdir
Executing Java Program from Cygwin (bash shell script)
$ java -classpath `cygpath -wp $CLASSPATH` [classname] [arguments]
Uninstall Cygwin
source
# Restart your computer.
# Backup anything you may added to the c:\cygwin\ directory which will
not be replaced by the re-installation.
# Delete the c:/cygwin subdirectory (where Cygwin was installed).
# Remove registry entries: Any time you change the registry, do so with
great care..
* Under HKEY_CURRENT_USER, Software, delete "Cygnus Solutions"
* Under HKEY_LOCAL_MACHINE, Software, delete "Cygnus Solutions"
# Use Start, Run, cmd, chkdsk /F. This will run chkdsk, check and repair
any file system problems on the next bootup.
# Restart your computer.
Subscribe to:
Posts (Atom)