sudo for users


 
Thread Tools Search this Thread
Operating Systems Solaris sudo for users
# 1  
Old 12-05-2008
sudo for users

Hello gurus,

Is there a flag or switch that you can added to sudoers file to always have users type 'sudo' prior to running a command?
# 2  
Old 12-05-2008
Quote:
Originally Posted by em23
Hello gurus,

Is there a flag or switch that you can added to sudoers file to always have users type 'sudo' prior to running a command?
I don't fully understand what you are asking for but I will give this a guess...

The sudoers file is only referenced when someone runs the sudo command. If you want all commands to run as root then you can sudo to root with 'sudo su -'.

If this does not answer your question please provide more information.
# 3  
Old 12-05-2008
so basically i have users running certain commands, not as root, but other user, but when they sudo su - username i want them to be able to still type sudo when they need to execute a cmd as that user.

Example:
$: sudo su - control
control$: sudo somecmd

instead of -
control$: somecmd
# 4  
Old 12-05-2008
Then you need to add the "control" user to sudo and give your users the "control" account password. If they need to sudo commands as the "control" user and you want a sudo shell then just sudo to root [or use Solaris profiles].

In short: no, what you're asking is not possible as requested.
# 5  
Old 12-05-2008
Quote:
Originally Posted by seg
Then you need to add the "control" user to sudo and give your users the "control" account password. If they need to sudo commands as the "control" user and you want a sudo shell then just sudo to root [or use Solaris profiles].

In short: no, what you're asking is not possible as requested.
that's what i thought.

thanks, seg!
# 6  
Old 12-08-2008
Quote:
Originally Posted by em23
Hello gurus,

Is there a flag or switch that you can added to sudoers file to always have users type 'sudo' prior to running a command?
I guess thats RBAC can help you
There cheat sheet , or docs.sun.com
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to check sudo access of other users?

Hi, I always use "sudo -U user -l" as root and it gives me list of sudo access, that person have. But on one Solaris server, I can't run it. recently only I installed latest patchset on this server. Not sure, if that changed something on this. However, sudo package is showing old one. # id -a... (1 Reply)
Discussion started by: ron323232
1 Replies

2. Red Hat

How to disable sudo -i in sudoers file for users?

All, I need to disable "sudo -i" and "su - " for all servers in our environment, We want to make sure no one run commands or delete files across environment using switching to root account. can you guys please lets me know if this is achievable. Thanks and Regards shekar (2 Replies)
Discussion started by: shekar777
2 Replies

3. UNIX for Dummies Questions & Answers

Pop the users one by one in sudo cat /etc/security/user

Hi Everyone, When I runthe query in ssh shell sudo cat /etc/security/user , I see half of the users cut down from the display screen. what I want to do is using the somthing like "pop" that when I hit the enter key every time the screen should move to the next user? does some one has any idea how... (4 Replies)
Discussion started by: starter2011
4 Replies

4. Shell Programming and Scripting

ldapsearch - extract 'sudo su' users with awk or sed.

Hello all, Hope you all are doing good :). First of all, I apologize for my bad English I want to get list of all user that have 'sudoCommand: ALL' I've tried different sed and awk combinations without success :wall: the command for extracting the OU for sudo is: ldapsearch -x... (4 Replies)
Discussion started by: corky
4 Replies

5. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

6. Shell Programming and Scripting

How to sudo to multiple users?

Hi all, I have to create SSH public key for multiple users. Iam creating a script in which, through root, I have to switch to multiple accounts to create SSH keys and then transfer it to the respective servers. First I tried with single user id and everything worked fine. When I try to sudo... (1 Reply)
Discussion started by: deepakwins
1 Replies

7. UNIX for Advanced & Expert Users

How can I get sudo -u <username> to load that users profile on HP-UX

I am running a serverapplication on a HP-UX machine where I need to handle some of the commands as a specified user called "druser". When I log on as this user with the command; sudo -u druser -sit starts an instance of the shell as that user. However, it doesn't load that users .profile from... (1 Reply)
Discussion started by: ukiome
1 Replies

8. UNIX for Dummies Questions & Answers

Is there a way to find users who have sudo permissions for non root?

I want to check if in a host a set of persons have sudo access or not and I dont have root access to the host. (1 Reply)
Discussion started by: pristine
1 Replies

9. Linux

Enable sudo for Win AD users authenticated with Linux samba winbind service

Hi everyone, I wonder if anyone ever came across the idea of unifying AD and Linux user accounts We have a Linux machine with 'samba' 'winbind' service configured to let Windows AD users to logon locally using their AD accounts and passwords. I can use 'su' to get to the local user privilege... (0 Replies)
Discussion started by: will_mike
0 Replies

10. UNIX for Dummies Questions & Answers

Can I export the users environment using sudo?

I want the user to be able to commands as another user.. but when they do that.. I need them to have the environment variables of the other user. is this possible with sudo? sudo -H -u user env 'env' is giving me the environment of the current user, not the user I want to run commands as. ... (1 Reply)
Discussion started by: julesdiane
1 Replies
Login or Register to Ask a Question