top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Changing the contents of /etc/resolve.conf in Solaris?

+2 votes
389 views

One of my teammate who runs Solaris 11.1 wants to modify file /etc/resolve.conf but modifying the file manually is not working since after a reboot the file is rewritten by some system process.

The following has some suggestions as what should be done in cases like this
http://www.oracle.com/technetwork/articles/servers-storage-admin/s11-network-config-1632927.html

Unfortunately, the commands do not work! So could you please give three commands so my friend can modify /etc/resolv.conf? Note he is using dhcp... And I dont have physical accesss to a Solaris 11.1 machine...

posted Jan 9, 2014 by Dewang Chaudhary

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

Did commands like these not work?

looks like he needs something like:

svccfg -s svc:/system/name-service/switch setprop config/host = "files dns"
svcadm refresh svc:/system/name-service/switch

Example: Configuring /etc/switch.conf Using SMF

In the following example, we use the name service switch mechanism to allow our system to search through the DNS, LDAP, NIS, or local file sources for naming information. We again use the svccfg command on the svc:/system/name-service/switch SMF service:

root@solaris:~# svccfg -s svc:/system/name-service/switch setprop
config/default = "files nis"
root@solaris:~# svccfg -s svc:/system/name-service/switch setprop
config/host = "files dns nis"
root@solaris:~# svccfg -s svc:/system/name-service/switch setprop
config/password = "files nis"
root@solaris:~# svcadm refresh svc:/system/name-service/switch
answer Jan 9, 2014 by Majula Joshi
Similar Questions
+3 votes

How to delete a symbolic link in Solaris ?

"ln -s" command is working fine to add a symbolic link. But how the symbolic link can be deleted ?
I tried like this, but its not working

ulink abc.xml
ulink: not found

I tried unlink command , but got the following message " command not found"

+1 vote

I have a perl script test.pl. I want to create desktop shortcut. While I click on this shortcut icon it will run my perl script and keep the terminal open.

I have tried the command

ln -s test.pl ~/Desktop/abc

while I click on this abc Icon from my desktop. It run and same time the terminal exit. Could you please help here?

My requirement is:

I want to create desktop shortcut for particular perl program. While I click on this icon from desktop, it should run and keep the terminal open.

0 votes

For a backup job on Solaris 10 x86, I need to raise the process.max-file-descriptors. For an interactive
session I could do "ulimit -S -n 512" or equivalent "prctl" command. Or it could be put into .profile.

Where would you recommend the command be run for cron jobs that do not source .profile

...