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.
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)
$ 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.
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).