LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Command to diplay Nameservers (https://www.linuxquestions.org/questions/linux-networking-3/command-to-diplay-nameservers-699030/)

ravi_chobey 01-21-2009 10:39 PM

Command to diplay Nameservers
 
Hi All,

Can anybody tell me commands to display primary and secondary nameservers And also the Workgroup in which my computer is there?

Thanks and Regards,
Ravi Chobey

bathory 01-22-2009 03:46 AM

If you want to see what nameservers your box is using you can:
Code:

cat /etc/resolv.conf
If you want to find the primary and secondary dns of a domain:
Code:

dig ns domain.com
Regarding samba, iirc to find out the workgroup you can use:
Code:

smbclient -L localhost
Regards

ravi_chobey 01-22-2009 05:39 AM

Dear Bathory Sir,

Thanks for your reply.I am able to display my Nameservers usin the commands you have mentioned.When when i am trying for workgroup,i am getting these outputs:

1> I have tried the command which you have provide:

smbclient -L localhost
added interface ip=192.168.1.4 bcast=192.168.1.255 nmask=255.255.255.0
error connecting to 127.0.0.1:139 (Connection refused)
Error connecting to 127.0.0.1 (Connection refused)
Connection to localhost failed

And i just made a try

2>

smbclient -L localhost.localdomain
added interface ip=192.168.1.4 bcast=192.168.1.255 nmask=255.255.255.0
error connecting to 127.0.0.1:139 (Connection refused)
Error connecting to 127.0.0.1 (Connection refused)
Connection to localhost.localdomain failed

Thanks for support.

Regards,
Ravi Chobey

bathory 01-22-2009 08:09 AM

This is because you're not running samba in your box.
You can use instead of localhost the name or the ip of another box that is master for your domain/workgroup

ravi_chobey 01-22-2009 11:34 PM

Dear Bathory Sir,

Thanks for your support in sorting my problems.

Regards,
Ravi Chobey


All times are GMT -5. The time now is 11:32 PM.