my domain is on one server and i wanted to put wildcard dns settings for another server.
basically i have two servers and i want all the wildcard to go on second server, how can i do that?
I'm migrating from an archaic version of Red Hat to Ubuntu 9. When going through my old nfs mount script, I found that it contained the -P option.
So my script looks like:
sudo mount -t nfs -o -P ...
It looks like the -P is one of the -o options. My question is: what does the -P option do? I've searched every man page I can find, with no luck. Could it have to do with privileged ports?
I use mount -o bind to mount directories inside chroots, which works really well. The problem is that I'd like some of these bind-mounted directories to be read only in chroot.
Is it possible? If not - any other way to achieve it?
I was thinking about using NFS for localhost mounts, but it looks like overkill.
Let say i have a source directory which contains The contents /foo/a /foo/b(These are the files in a directory on a remote system)
using rdiff command i make a backup as
rdiff-backup [email protected]::/foo backups
And a,b are now present in my backups directory.And then i delete file a from the remote system and again i do a sync so my local directory has the file b only.
My question is that how do i restore file a if the deletion and sync is done on the same day
Thanks..
I'm trying to setup the logentries service. If a log entry has a token in it then I would like to send it to api.logentries.com:10000. The token is a guid in the format aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee.
Right now I'm doing:
# If there's a logentries token then send it directly to logentries
:msg, regex, ".*[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}.*"
& @@api.logentries.com:10000
I checked the rsyslog debug logs and my regex is not matching, but I can't figure out why or how to fix it:
5245.961161378:7fb79b514700: Filter: check for property 'msg' (value ' fb1c507f-2ede-4d7f-a140-2bd8d56e133 - application - [play-akka.actor.default-dispatcher-1] - Found user: 4fb11ea5e4b00a1aeebe2800') regex '.*[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}.*': FALSE
My www folder is root:root. What should it be? My site works perfectly but maybe I am doing something wrong.
My nginx.conf says user is 'nginx'. Should I be changing the www onwership and group to that or something else?
Mainly I want to be able to sftp into the www folder using FileZilla. Preferably only allow access to the www folder. I want to be able to upload the website files but I just don't know the proper procedure.
I have tried changing owners and groups but I get worried some part of the stack will not like it. For example does nginx play along, and php?
I thought about having a sftp group or even an sftp user. But I don't want to go down a path that should be avoided.
What should I be doing with my setup?
Hi!
I'm trying really hard since two hours to install ssh2 with pecl... But all I get is:
/bin/sh /root/ssh2-0.11.0/libtool --mode=compile cc -I. -I/root/ssh2-0.11.0 -DPHP_ATOM_INC -I/root/ssh2-0.11.0/include -I/root/ssh2-0.11.0/main -I/root/ssh2-0.11.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2-0.11.0/ssh2.c -o ssh2.lo
mkdir .libs
cc -I. -I/root/ssh2-0.11.0 -DPHP_ATOM_INC -I/root/ssh2-0.11.0/include -I/root/ssh2-0.11.0/main -I/root/ssh2-0.11.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2-0.11.0/ssh2.c -fPIC -DPIC -o .libs/ssh2.o
/root/ssh2-0.11.0/ssh2.c:52: error: duplicate 'static'
/root/ssh2-0.11.0/ssh2.c: In function 'zif_ssh2_methods_negotiated':
/root/ssh2-0.11.0/ssh2.c:503: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:504: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:508: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:509: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:510: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:511: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:516: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:517: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:518: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:519: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c: In function 'zif_ssh2_publickey_add':
/root/ssh2-0.11.0/ssh2.c:1045: warning: passing argument 1 of '_efree' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_alloc.h:46: note: expected 'void *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c: In function 'zif_ssh2_publickey_list':
/root/ssh2-0.11.0/ssh2.c:1104: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:361: note: expected 'char *' but argument is of type 'const unsigned char *'
/root/ssh2-0.11.0/ssh2.c:1105: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:361: note: expected 'char *' but argument is of type 'const unsigned char *'
make: *** [ssh2.lo] Error 1
I looked on google a lot, I found some patches which didn't worked at all. So if you think you could help me, go ahead!
Thanks!
Suddenly, yesterday, one of my apache servers became unable to connect to my LDAP (AD) server. I have two sites running on that server, both of which use LDAP to auth against my AD server when a user logs in to either site. It had been working fine two days ago. For reasons unknown, as of yesterday, it stopped working. The error log only says this:
auth_ldap authenticate: user foo authentication failed; URI /FrontPage [LDAP: ldap_simple_bind_s() failed][Can't contact LDAP server], referer: http://mysite.com/
I thought perhaps my self-signed SSL cert had expired, so I created a new one for mysite.com, but not for the server hostname itself, and the problem persisted. I enabled debug-level logging. It shows the full SSL transaction with the LDAP server, and it appears to complete without errors until the very end when I get the "Can't contact LDAP server" message. I can run ldapsearch from the commandline on this server, and I can login to it, which also uses LDAP, so I know that the server can connect to and query the LDAP/AD server. It is only apache that cannot connect.
Googling for an answer has turned up nothing, so I'm asking here. Can anybody provide insight to this problem?
Here's the LDAP section from the apache config:
<Directory "/web/wiki/">
Order allow,deny
Allow from all
AuthType Basic
AuthName "Login"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
#AuthBasicAuthoritative off
AuthLDAPUrl ldaps://domain.server.ip/dc=full,dc=context,dc=server,dc=name?sAMAccountName?sub
AuthLDAPBindDN cn=ldapbinduser,cn=Users,dc=full,dc=context,dc=server,dc=name
AuthLDAPBindPassword password
require valid-user
</Directory>
I'm trying to better understand symbolic links... and not having very much luck. This is my actual shell output with username/host changed:
username@host:~$ mkdir actual
username@host:~$ mkdir proper
username@host:~$ touch actual/file-1.txt
username@host:~$ echo "file 1" > actual/file-1.txt
username@host:~$ touch actual/file-2.txt
username@host:~$ echo "file 2" > actual/file-2.txt
username@host:~$ ln -s actual/file-1.txt actual/file-2.txt proper
username@host:~$ # Now, try to use the files through their links
username@host:~$ cat proper/file-1.txt
cat: proper/file-1.txt: No such file or directory
username@host:~$ cat proper/file-2.txt
cat: proper/file-2.txt: No such file or directory
username@host:~$ # Check that actual files do in fact exist
username@host:~$ cat actual/file-1.txt
file 1
username@host:~$ cat actual/file-2.txt
file 2
username@host:~$ # Remove the links and go home :(
username@host:~$ rm proper/file-1.txt
username@host:~$ rm proper/file-2.txt
I thought that a symbolic link was supposed to operate transparently, in the sense that you could operate on the file that it points to as if you were accessing the file directly (except of course in the case of rm where of course the link is simply removed).
So this is more of a "I'm trying to learn about how this works" question rather than "there is a serious problem I can't figure out!" question. I'm setting up a VPS and have been tweaking and changing things here and there. I recently installed munin (like two days ago) and yesterday I noticed a significant increase in mysql activity.
So now my curiosity is going crazy. How do I setup/access mysql's query log? I have about 5 databases on the server so I want to see which one is getting all the action. Is there anything else I can do to keep a better eye on what's going on?
Here are the graphs. As you can tell, it's not that much activity at all but I'm just curious at the change. The sites that are on the server right now do not get a lot of traffic. It's running a couple drupal sites, only one of which is live. The live one hasn't had a spike in traffic and the last spike was 250 visitors so it's barely a spike at all.
I am trying to setup per-user fastcgi scripts that will run each on a different port and with a different user. Here is example of my script:
#!/bin/bash
BIND=127.0.0.1:9001
USER=user
PHP_FCGI_CHILDREN=2
PHP_FCGI_MAX_REQUESTS=10000
etc...
However, if I add user with /bin/false (which I want, since this is about to be something like shared hosting and I don't want users to have shell access), the script is run under 1001, 1002 'user' which, as my Google searches showed, might be a security hole. My question is: Is it possible to allow user(s) to execute shell scripts but disable them so they cannot log in via SSH?
I'm trying to install a Windows SBS 2008 server in a Xen environment. The OS is booting fine. Unfortunately I can't figure out how to set up the network settings.
Dom0 is a Debian Lenny hosting around 10 virtual servers.
Here are the settings I'm using in the hosted Windows SBS:
IP address: 10.20.0.8
Network mask: 255.255.0.0
Gateway: 10.20.0.1
Note that during the installation stage, Windows set the net mask at 255.255.255.0 without letting me choose. Gross.
Windows SBS tells me I have a "limited connection".
I can't ping the gateway nor any other IP except localhost and it's own IP (10.20.0.8).
Here is the Xen config file:
kernel = '/usr/lib/xen-3.2-1/boot/hvmloader'
builder = 'hvm'
memory = '4096'
device_model='/usr/lib/xen-3.2-1/bin/qemu-dm'
acpi=1
apic=1
pae=1
vcpus=1
name = 'winexchange'
# Disks
disk = [
'phy:/dev/wnghosts/exchange-disk,ioemu:hda,w',
'file:/mnt/freespace/ISO/DVD1_Installation.iso,ioemu:hdc:cdrom,r'
]
# Networking
vif = [ 'mac=00:16:3E:0A:D0:1B, type=ioemu, bridge=xenbr0']
# video
stdvga=0
serial='pty'
ne2000=0
# Behaviour
boot='c'
sdl=0
# VNC
vfb = [ 'type=vnc' ]
vnc=1
vncdisplay=1
vncunused=1
usbdevice='tablet'
This config is working with others Windows XP domU's.
I tried to change the ne2000 values with 0 and 1 with no effect.
I am far from having good Windows administration skills so I guess I definitely need some help on this case.
Thanks.
I've been using my laptop with an external LCD monitor attached to it at work (Philips 201E). And at home with a different external monitor (Samsung 2032BW).
I have an ATI graphics card (HD3450), with Ati Catalyst drivers enabled and I'm using the Single display desktop (Multi-Desktop) seeting. At work I have the external monitor on the left and laptop on the right, while at home the other way around.
So when I switch between the two setups, I just needed to go to Ati Catalyst Control Center, change the order of the displays, change the resolution (Home - 1680x1050, Work - 1440x900), reboot and it was all fine.
But since a while it doesn't work properly anymore:
At home it still works fine.
At work it doesn't work. Sometimes it works for some reason, after a few resolution/setting changes in ACCC and reboots... it's very strange and annoying.
With the home monitor I can see the whole bootup process on both monitors (laptop + LCD) and it always just works fine. With the work monitor on the external LCD monitor I just see "No video input" until I get to the login screen, then it shows up there as well. But after login it will either:
Flicker a few times, but then work
OK.
Or (more often) Flicker once
and then go back to "No video input"
again. I usually end up rebooting a
few times until it works.
Does anyone have any idea for fixing it?
This is my xorg.conf currently:
Section "ServerLayout"
Identifier "amdcccle Layout"
Screen 0 "amdcccle-Screen[6]-0" 0 0
Screen "amdcccle-Screen[6]-1" 1280 0
EndSection
Section "Files"
EndSection
Section "Module"
Load "glx"
EndSection
Section "ServerFlags"
Option "Xinerama" "off"
EndSection
Section "Monitor"
Identifier "0-LVDS"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
Option "PreferredMode" "1280x768"
Option "TargetRefresh" "60"
Option "Position" "0 0"
Option "Rotate" "normal"
Option "Disable" "false"
EndSection
Section "Monitor"
Identifier "0-CRT1"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
Option "TargetRefresh" "60"
Option "Position" "0 0"
Option "Rotate" "normal"
Option "Disable" "false"
Option "PreferredMode" "1440x900"
EndSection
Section "Device"
Identifier "Default Device"
Driver "fglrx"
EndSection
Section "Device"
Identifier "amdcccle-Device[6]-0"
Driver "fglrx"
Option "Monitor-LVDS" "0-LVDS"
BusID "PCI:6:0:0"
EndSection
Section "Device"
Identifier "amdcccle-Device[6]-1"
Driver "fglrx"
Option "Monitor-CRT1" "0-CRT1"
BusID "PCI:6:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Default Screen"
DefaultDepth 24
SubSection "Display"
Virtual 2560 1024
EndSubSection
EndSection
Section "Screen"
Identifier "amdcccle-Screen[6]-0"
Device "amdcccle-Device[6]-0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "amdcccle-Screen[6]-1"
Device "amdcccle-Device[6]-1"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
In RHEL5,
1.How to establish a VPN connection,The details i get to connect the VPN are ipaddreess ,username/password
2.How to install wifi drivers on RHEL5
Thanks..
i have two RHEL5 boxes on a private network together (192.168.2.0/24) and I am trying to export a file system from one to the other but I keep getting the following error:
mount.nfs: Input/output error
on the client side I see this output:
mount: trying 192.168.2.101 prog 100003 vers 3 prot tcp port 2049
mount: trying 192.168.2.101 prog 100005 vers 3 prot tcp port 960
and on the server side I see this:
Sep 20 14:14:32 omicron mountd[18739]: authenticated mount request from 192.168.2.87:635 for /srv/nfs/web (/srv/nfs/web)
but that's all. I opened up iptables so that the whole 192.168.2.0/24 network is allowed to communicate freely but the public side is locked down to 22,80 etc....
any ideas?
I have a fedora 12 box that I am using as a sandbox for web development and a few other toys.
The box gets really hot so I would like it to sleep/hibernate when no one is using it, however most of the people connecting to the box will not be able to access it physically.
Is it possible to set up a Wake On Lan that wakes up the machine when it detects an SSH connection?
A google search didn't yield much information. (or atleast I wasn't smart enough to register it as useful!)
I have a ~2TB ext4 USB external disk which is about half full:
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc 1922860848 927384456 897800668 51% /media/big
I'm wondering why the total size (1922860848) isn't the same as Used+Available (1825185124)? From this answer I see that 5% of the disk might be reserved for root, but that would still only take the total used to 1921328166, which is still off. Is it related to some other filesystem overhead?
In case it's relevant, lsof -n | grep deleted shows no deleted files on this disk, and there are no other filesystems mounted inside this one.
Quite often, the script I want to execute is not located in my current working directory and I don't really want to leave it.
Is it a good practice to run scripts (BASH, Perl etc.) from another directory? Will they usually find all the stuff they need to run properly?
If so, what is the best way to run a "distant" script? Is it
. /path/to/script
or
sh /path/to/script
and how to use sudo in such cases? This, for example, doesn't work:
sudo . /path/to/script
socat - exec:'bash -li',pty,stderr,ctty - bash: no job control in this shell
What options should I use to get fully fledged shell as I get with ssh/sshd?
I want be able to connect the shell to everything socat can handle (socks5, udp, openssl), but also to have a nice shell which correctly interprets all keys, various Ctrl+C/Ctrl+Z and jobs control.
Update: Found "setsid" socat option. It fixes "no job control". Now trying to fix Ctrl+D.
Is there any config files for xterm for default settings? For example, on my system, xterm start with black text on white background, and I want it the other way around. I can do it by starting it with:
xterm -bg black -fg white.
I want to set in a config file that if I run it without arguments, it will start with these options.
I've been running xen for a few weeks now on an Ubuntu 12.04 server. I've got 3 guests: a Windows Server 2003 guest, an Ubuntu guest, and a Windows 7 Guest. My Server 2003 guest seems to work fine; I can ping it from the network, the hostname resolves correctly, and it can see the internet. This guest is attached to xenbr0, and its IP is 10.100.1.21.
My Win7 guest is what is driving me crazy. I use the same configuration script as a base, changing the important parts (hostname and boot disk, mainly). It installed correctly, and is currently running, but I am unable to ping this guest. It's hostname is "alexander", with an IP of 10.100.1.22. It is also using xenbr0. The guest can ping the firewall and various IP addressess, but seems unable to resolve hostnames.
Now heres the weird part: when I use rdesktop (RDP client) from my laptop (not the xen host) to connect to alexander, it works just fine. It apparently resolves the hostname fine, and does the same with the IP address.
So, can someone tell me why I can access this guest using RDP, but not using ping, nslookup, traceroute, etc? It's apparently invisible to all but RDP. Also, is it okay to use two guests on the same bridge, or do i need different ones for each guest?
Thanks in advance for any help.
Regards
I wanted to install adobe reader on my ubuntu 10.10(Maverick Meerkat).I have downloaded the file and copied it on my desktop.I had then browsed to the desktop directory through command line terminal.
I had tried all the possible combinations of the commands but still i get a "file or directory does not exist error"
roger@ubuntu:~/Desktop$ chmod a+x AdbeRdr9.4-1_i486linux_enu.bin
roger@ubuntu:~/Desktop$ sudo ./AdbeRdr9.4-1_i486linux_enu.bin
sudo: unable to execute ./AdbeRdr9.4-1_i486linux_enu.bin: No such file or directory
I tried without the sudo and this is what i get
roger@ubuntu:~/Desktop$ chmod a+x AdbeRdr9.4-1_i486linux_enu.bin
roger@ubuntu:~/Desktop$ ./AdbeRdr9.4-1_i486linux_enu.bin
bash: ./AdbeRdr9.4-1_i486linux_enu.bin: No such file or directory
The file is present in the desktop.Where am i going wrong?
P.S:This is not a duplicate of the question Cannot install .bin package on Ubuntu
How can I change disk volume id in wine?
There is vol command in windows which shows volume id and VolumeID (from Sysinternals) which can change VolumeID in windows but not in wine.