Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to run root level command , if user has "su -" permission in sudoers provided? Post 303043388 by rbatte1 on Monday 27th of January 2020 08:28:33 AM
Old 01-27-2020
The privilege you have permits you to become the superuser, but not to directly run anything from your account but as the superuser.

If you can become the superuser, then I presume you are the system administrator (or part of the team) so you should know how to write yourself the appropriate sudo rule. Can you show us what you have tried?


- - CAUTION - -
If you break the sudo rules, then it is possible to lock yourself out, i.e. if they are invalid then you may not be able to even sudo su - like you can at the moment.
Make sure you have several superuser session already connected before you do this, and better to use the visudo tool too. It protects you somewhat, but it's probably not infallible.
Take copies of any files before you changes them and make sure you have a way and privilege to put them back if you need to. Save the permissions, else sudo may still refuse to run.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies

2. Solaris

sendmail "root... User address required." error

I'm running sendmail (8.13.8+Sun/8.13.8/Submit) solaris 10. When I send mail to root at the command line (whether I use a full-qualified address or just root), I get the error message root... User address required. Sending mail to root (either at the command line or in a cron job),... (10 Replies)
Discussion started by: csgonan
10 Replies

3. Red Hat

How do I run my "SMTP" service as a root privilege ?

Friends , i want to run my smtp service as a root . let me know what r the changes i have to made to my machine . AVklinux (1 Reply)
Discussion started by: avklinux
1 Replies

4. UNIX for Dummies Questions & Answers

crontab does not run "root" job

hi, I've read different posts regarding crontab but none helped out...the shell scrip that I want to run through crontab gets run through crontab when I use the following crontab statement: 13 17 * * * /usr/net/gcc/DBdrop.sh > /usr/net/gcc/DBdrop.log 2>&1 but it does not run when I scheduel... (2 Replies)
Discussion started by: linux0004
2 Replies

5. UNIX for Dummies Questions & Answers

changing password with sudo user " permission denied"

HI All, I am using solaris i created a user adam and updated his permissions in vi sudoers file as follows adam ALL=(ALL) NOPASSWORD: ALL ........... when i create user by logging as sudo user . $ sudo useradd -d /home/kalyan -m -s /bin/sh kalyan sudo: not found ... (6 Replies)
Discussion started by: kalyankalyan
6 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

Rsync is not working at root "/" level between two servers

copying daily changes from serverA to serverB using rsync(solaris8, v2.6.2) at root folder level. serverA: cd / rsync -a -vv --delete --checksum --sparse --stats --dry-run --exclude /tmp/ --exclude /proc/ --exclude /devices/ . root@<IP of ServerB>:/ This is generating mainly three debug... (0 Replies)
Discussion started by: kchinnam
0 Replies

8. AIX

Change "root" to "root.admin" in outgoing e-mails

Our AIX servers send e-mails which have the "from" address set to "root@company.com" for our root user ("C{M}company.com" in /etc/sendmail.cf). The problem is that when bad e-mails are sent out or rejected by remote servers, they are being returned and delivered to e-mail box of "Mary Root". ... (2 Replies)
Discussion started by: kah00na
2 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. Shell Programming and Scripting

Permission error when "touch"ing file with different user

Hi, There are 2 users (T886072 & T864764) that need to be provided full (rwx) access to a directory. I made the changes to the directory permissions using chmod and setfacl : root@digidb2:# chmod 700 /u02/ftpfiles/MFRS16/discount_rates/ root@digidb2:# setfacl -s... (3 Replies)
Discussion started by: anaigini45
3 Replies
nisserver(1M)						  System Administration Commands					     nisserver(1M)

NAME
nisserver - set up NIS+ servers SYNOPSIS
/usr/lib/nis/nisserver -r [-x] [-f] [-v] [-Y] [ -d NIS+_domain] [ -g NIS+_groupname] [-l network_passwd] /usr/lib/nis/nisserver -M [-x] [-f] [-v] [-Y] -d NIS+_domain [ -g NIS+_groupname] [ -h NIS+_server_host] /usr/lib/nis/nisserver -R [-x] [-f] [-v] [-Y] [ -d NIS+_domain] [ -h NIS+_server_host] DESCRIPTION
The nisserver shell script can be used to set up a root master, non-root master, and replica NIS+ server with level 2 security (DES). If other authentication mechanisms are configured with nisauthconf(1M), nisserver will set up a NIS+ server using those mechanisms. nisauth- conf(1M) should be used before nisserver. When setting up a new domain, this script creates the NIS+ directories (including groups_dir and org_dir) and system table objects for the domain specified. It does not populate the tables. nispopulate(1M) must be used to populate the tables. OPTIONS
-d NIS+_domain Specifies the name for the NIS+ domain. The default is your local domain. -f Forces the NIS+ server setup without prompting for confirmation. -g NIS+_groupname Specifies the NIS+ group name for the new domain. This option is not valid with -R option. The default group is admin.<domain>. -h NIS+_server_host Specifies the hostname for the NIS+ server. It must be a valid host in the local domain. Use a fully qualified hostname (for example, hostx.xyz.sun.com.) to specify a host outside of your local domain. This option is only used for setting up non-root master or replica servers. The default for non-root master server setup is to use the same list of servers as the parent domain. The default for replica server setup is the local hostname. -l network_password Specifies the network password with which to create the credentials for the root master server. This option is only used for master root server setup (-r option). If this option is not specified, the script prompts you for the login password. -M Sets up the specified host as a master server. Make sure that rpc.nisd(1M) is running on the new master server before this command is executed. -R Sets up the specified host as a replica server. Make sure that rpc.nisd is running on the new replica server. -r Sets up the server as a root master server. Use the -R option to set up a root replica server. -v Runs the script in verbose mode. -x Turns the echo mode on. The script just prints the commands that it would have executed. Note that the commands are not actually executed. The default is off. -Y Sets up a NIS+ server with NIS-compatibility mode. The default is to set up the server without NIS-compatibility mode. USAGE
Use the first synopsis of the command (-r) to set up a root master server. To run the command, you must be logged in as super-user on the server machine. Use the second synopsis of the command (-M) to set up a non-root master server for the specified domain. To run the command, you must be logged in as a NIS+ principal on a NIS+ machine and have write permission to the parent directory of the domain that you are setting up. The new non-root master server machine must already be an NIS+ client (see nisclient(1M)) and have the rpc.nisd(1M) daemon running. Use the third synopsis of the command (-R) to set up a replica server for both root and non-root domains. To run the command, you must be logged in as a NIS+ principal on a NIS+ machine and have write permission to the parent directory of the domain that you are replicating. The new non-root replica server machine must already be an NIS+ client and have the rpc.nisd daemon running. EXAMPLES
Example 1: Setting up Servers To set up a root master server for domain sun.com.: root_server# /usr/lib/nis/nisserver -r -d sun.com. For the following examples make sure that the new servers are NIS+ clients and that rpc.nisd is running on these hosts before executing nisserver. To set up a replica server for the sun.com. domain on host sunreplica: root_server# /usr/lib/nis/nisserver -R -d sun.com. -h sunrep To set up a non-root master server for domain xyz.sun.com. on host sunxyz with the NIS+ groupname as admin-mgr.xyz.sun.com.: root_server# /usr/lib/nis/nisserver -M -d xyz.sun.com. -h sunxyz -g admin-mgr.xyz.sun.com. To set up a non-root replica server for domain xyz.sun.com. on host sunabc: sunxyz# /usr/lib/nis/nisserver -R -d xyz.sun.com. -h sunabc ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
nis+(1), nisgrpadm(1), nismkdir(1), nisaddcred(1M), nisauthconf(1M), nisclient(1M), nisinit(1M), nispopulate(1M), nisprefadm(1M), nis- setup(1M), rpc.nisd(1M), attributes(5) NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.10 13 Dec 2001 nisserver(1M)
All times are GMT -4. The time now is 06:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy