Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Oct 10, 2008 5:12 am 
Offline
Senior Newbie

Joined: Fri Sep 21, 2007 5:50 pm
Posts: 11
I created a subdomain and the nslookup works just fine on my local laptop:

Code:
Administrator@LIFEBOOK ~ : nslookup applepatch.livingcosmos.org
*** Can't find server name for address 192.168.1.1: Non-existent domain
*** Default servers are not available
Non-authoritative answer:
Server:  UnKnown
Address:  192.168.1.1

Name:    applepatch.livingcosmos.org
Address:  69.56.173.168

Administrator@LIFEBOOK ~ :



But this same lookup fails on my linode, which is where the domain livingcosmos.org is:


Code:
nslookup applepatch.livingcosmos.org
** server can't find applepatch.livingcosmos.org: NXDOMAIN




How can I 'wake up' my linode to this new subdomain?


Top
   
 Post subject:
PostPosted: Fri Oct 10, 2008 10:31 am 
Offline
Senior Member

Joined: Fri Sep 12, 2008 3:17 am
Posts: 166
Website: http://independentchaos.com
Code:
#echo -e "69.56.173.168\t\tapplepatch.livingcosmos.org" >> /etc/hosts


That is the easiest way.

The real way would be to check your DNS entries in your /etc/resolv.conf and make sure you create either a CNAME or an ANAME in your DNS Manager.

*note: the # sign denotes root, or use sudo.


Top
   
 Post subject:
PostPosted: Fri Oct 10, 2008 3:13 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
freedom_is_chaos wrote:
Code:
#echo -e "69.56.173.168\t\tapplepatch.livingcosmos.org" >> /etc/hosts

*note: the # sign denotes root, or use sudo.

Heh; "sudo echo > blah" doesn't do much of any use 'cos the redirection is done at the calling shell, so you have, effectively "sudo echo" being run with output to "blah"... which happens as the normal user.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Fri Oct 10, 2008 6:00 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Figure out what DNS server your laptop is using (actually, looks like it is a local caching nameserver). Figure out what server your linode is using (should probably be the local Linode nameserver(s)) Figure out why they're different. You may find the dig tool to be more informative than nslookup:
Code:
$ dig @some.dnsserver.name applepatch.livingcosmos.org

; <<>> DiG 9.5.0-P2 <<>> applepatch.livingcosmos.org
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60618
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;applepatch.livingcosmos.org.   IN   A

;; ANSWER SECTION:
applepatch.livingcosmos.org. 86400 IN   A   69.56.173.168

;; AUTHORITY SECTION:
livingcosmos.org.   86400   IN   NS   ns1.linode.com.
livingcosmos.org.   86400   IN   NS   ns2.linode.com.
livingcosmos.org.   86400   IN   NS   ns3.linode.com.
livingcosmos.org.   86400   IN   NS   ns4.linode.com.

;; Query time: 186 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri Oct 10 16:47:38 2008
;; MSG SIZE  rcvd: 143

So it looks like the Linode nameservers have the right data, but your linode is using them.[/code]

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
 Post subject:
PostPosted: Sat Oct 11, 2008 4:34 am 
Offline
Senior Member

Joined: Fri Sep 12, 2008 3:17 am
Posts: 166
Website: http://independentchaos.com
sweh wrote:
Heh; "sudo echo > blah" doesn't do much of any use 'cos the redirection is done at the calling shell, so you have, effectively "sudo echo" being run with output to "blah"... which happens as the normal user.

What?


Top
   
 Post subject:
PostPosted: Sat Oct 11, 2008 8:30 am 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
Code:
mwalling@you ~$ sudo echo "something" > /root/somefile
bash: /root/somefile: Permission denied


Top
   
 Post subject:
PostPosted: Sat Oct 11, 2008 9:46 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
freedom_is_chaos wrote:
sweh wrote:
Heh; "sudo echo > blah" doesn't do much of any use 'cos the redirection is done at the calling shell, so you have, effectively "sudo echo" being run with output to "blah"... which happens as the normal user.

What?

Not sure I could say it any simpler, but if you didn't understand the reasoning then just trust me; "sudo echo > blah" does not work.

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Sat Oct 11, 2008 9:49 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
mwalling wrote:
Code:
mwalling@you ~$ sudo echo "something" > /root/somefile
bash: /root/somefile: Permission denied

Precisely.

You could even do a different test...
Code:
sweh$ ls -l /tmp/a_new_file
/bin/ls: /tmp/a_new_file: No such file or directory
sweh$ sudo echo hello > /tmp/a_new_file
sweh$ ls -l /tmp/a_new_file
-rw-r--r-- 1 sweh sweh 6 Oct 11 09:48 /tmp/a_new_file


This shows that the file creation (and thus the redirection) is done as the real user and not as root.

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Sun Oct 12, 2008 11:08 pm 
Offline
Senior Member

Joined: Fri Sep 12, 2008 3:17 am
Posts: 166
Website: http://independentchaos.com
sweh wrote:
Not sure I could say it any simpler, but if you didn't understand the reasoning then just trust me; "sudo echo > blah" does not work.


Sorry, I must have been really tired at the time. I understand it now though. Thanks.

I didn't even read over the examples :D before I got it. Thanks for them though.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group