Create user with sudo ability to root.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Create user with sudo ability to root.
# 1  
Old 09-20-2013
Create user with sudo ability to root.

Hi All,

I need to give an user sudo ability to root.
We have also generated RSA key but unable to proceed further.

For example after a user logs into the server normally and when he executes below command

Code:
$ssh root@server_name

This should take you to root prompt #


Please help me.

Rocky

Last edited by Scott; 09-20-2013 at 02:53 PM.. Reason: Moved from 'advanced' forum; removed formatting; added code tags
# 2  
Old 09-20-2013
How is sudo involved in this question?

Generally you cannot login to root directly over ssh, check the 'permitrootlogin' option.
# 3  
Old 09-20-2013
What I am confused by your post is that do you need a user say xyz to have root permissions through sudo?
If this is the case, you need to edit your sudoers file.


or

ssh to the server with root user?

what Corona688 said should resolve the issue. There are many other options in ssh config that will decide which users are allowed to ssh to the server.

After creating the ssh key for the user, you need to add the public key under user's ssh folder of the target server.
# 4  
Old 09-23-2013
Hi Guys,

Thanks for your support.
I had got the solution from one of the posts and had it resolve my problem. I thought of sharing it here.

Step 1 --- Login to the physical server and navigate to /usr/local/bin

# cd /usr/local/bin

Step 2 --- Take a backup of keyaccess file

# cp –p keyaccess keyaccess_original

Step 3 --- Add an entry in the keyaccess file

# vi keyaccess

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAlems+KrluE84R3dpuS7mPU/uGJqm77YjWbx+Yqvj8geijykD55qf2QeqSiJc0dVakk7tykTm60++HwCAGv5DFArm1DSP+nDRd0pK68FsQywH9lblYj1daLrH/xL/WQypmg5sM2CqXFHPMqPX5+Vm8bu6dXQbLQ5bXNZEDEcBTPU= Testuser

Step 4 --- Execute the keyaccess script file

syntax: ./keyaccess -a username zonename


I hope my posting would help someone in life somewhere....


Regards,
Rocky
This User Gave Thanks to Rockyc3400 For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Sudo access of rm to non-root user

Hello, It is Solaris-10. There is a file as /opt/vpp/dom1.2/pdd/today_23. It is always generated by root, so owned by root only. This file has to be deleted as part of application restart always and that is done by app_user and SA is always involved to do rm on that file. Is it possible to give... (9 Replies)
Discussion started by: solaris_1977
9 Replies

2. Red Hat

Sudo to user other than root but do not allow sudo to root

I have a set of RHEL 5 boxes running our ERP software on Oracle databases. I need to allow my DBA's to su to oracle and one other account (banner) without knowing the oracle or banner password. But I need to prevent them from su'ing to any other user especially root. I only want them to be able to... (1 Reply)
Discussion started by: westmoreland
1 Replies

3. UNIX for Dummies Questions & Answers

How to create a file even root user also cant delete?

Is there any way to create a file in linux that root user also can't delete? (8 Replies)
Discussion started by: palani13dec
8 Replies

4. UNIX for Dummies Questions & Answers

Sudo to delegate permission from non-root user to another non-root user

I've been through many threads before i decide to create a separate thread. I can't really find the solution to my (simple) problem. Here's what I'm trying to achieve: As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user. The only to achieve this is to... (1 Reply)
Discussion started by: canar
1 Replies

5. AIX

How to create a user as a root

please give me any suggestion, how can i create user as root privilege. (please give me very safest way because i have production servers) (5 Replies)
Discussion started by: reply.ravi
5 Replies

6. Shell Programming and Scripting

Cron job initiating ssh AND sudo (from user, not root)

I've been bashing my head on the desk for 2 days trying to get this to work, but I've had no luck. I'll try to be as clear as possible in my explanation without dragging out the details. I'm trying to set up a cron job for user "john" which runs a script. This script initiates an ssh connection to... (5 Replies)
Discussion started by: eh3civic
5 Replies

7. Shell Programming and Scripting

How to create a directory inside root as different user

Hi All, I have directory under /opt/test. The ownership of the test directory is root:root. I have login to the server as test user. I need to have some script to create a directory inside /opt/test. This script will be called as test user. When I try to execute... (4 Replies)
Discussion started by: kalpeer
4 Replies

8. AIX

create user like root

hello I would like to create another user like root With smit user, I have duplicate all the configuration from root to root2 (groupe, secondary group, administrative, etc...) But when I connect with root2, i don't go to all directory: "permission denied !" I don't understand where is the... (10 Replies)
Discussion started by: pascalbout
10 Replies

9. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies

10. Red Hat

How can l create a user that as all the Attribute & Privilages of root

Hi, Is it possible to create a user in Linux 8.0 with all the attribute and the privilages of super user (root). Without using root as the logg in name. Thanx (6 Replies)
Discussion started by: kayode
6 Replies
Login or Register to Ask a Question