sudoers file not found

root@dervish # cat /etc/sudoers
cat: cannot open /etc/sudoers

This is what I get when I try to search for the sudoers files. I want to create a user by name jda and assign him root privileges. How can I do that using sudo command and editing sudoers file.

Please help me.

You would need to install sudo first.

could you please tell me how to do that ?? whats the procedure to install and how should I create an account....

Thank you so much

You can get it from here and install.
Example to install a package on Solaris 9:
#pkgadd -d sudo-1.6.7p5-sol9-sparc-local

I have solaris 10 and will the package be available for sure in the system or do I have to download it first before installing ??? Are the packages found in /var/spool ?

Nope, you have to download and install package sudo-1.6.8-sol10-sparc

SUDO Setup
# gunzip /pub/sudo-1.6.8p9-sol10-sparc-local.gz
# pkgadd -d /pub/sudo-1.6.8p9-sol10-sparc-local
--> select 1 --> y --> y (add local admin user accounts by issuing
visudo command)

Additionnaly, the configuration file for this Sunfreeware package is /usr/local/etc/sudoers.

Thank you so much.

I have an X4500 X86 processor. Could you please give me the link for X86. Do I need to follow up the same syntax given above ?

get it here: ftp://ftp.sunfreeware.com/pub/freeware/intel/10/sudo-1.6.8p9-sol10-intel-local.gz
yes, its the similar step...

$ gunzip sudo-1.6.8p9-sol10-intel-local.gz
$ su root -c "/usr/sbin/pkgadd -d sudo-1.6.8p9-sol10-intel-local"
The following packages are available:
1 SMCsudo sudo
(intel) 1.6.8p9

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: [ENTER]
:(skip)
The following files are being installed with setuid and/or setgid
permissions:
/usr/local/bin/sudoedit <setuid root>

Do you want to install these as setuid/setgid files [y,n,?,q] y
:(skip)
Installation of <SMCsudo> was successful.

thank you so much for the procedure. I would try it.

Alternatively, you could use the simpler Solaris native rbac.

usermod -P "Primary Administrator" jda

Thank you so much jlliagre.

On Solaris 9,

pkginfo shows I have SFWsudo installed

It looks for the sudoers file in /opt/sfw/etc/sudoers, not in the usual /etc/sudoers location (makes sense, since 'which sudo' is /opt/sfw/bin/sudo on my system).