LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 07-03-2011, 01:19 PM   #1
sandeep002gupta
Member
 
Registered: Apr 2011
Posts: 96
Blog Entries: 1

Rep: Reputation: 0
Smile command used: sudo su - username


Hi All,

I want to use sudo user with command of sudo su - username.
for this command want to make password less (like in user prompt$ type sudo su - root and it will login without password) so can any one help me here.
 
Old 07-03-2011, 02:08 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Code:
sudo visudo
Then adding the following at the end of /etc/sudoers by


Code:
%sudo ALL=(ALL) NOPASSWD: /bin/su
will enable for all in sudo group ( or whatever group you specify.)
 
Old 07-05-2011, 11:08 AM   #3
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
I would restrict them to a single user I wouldn't leave them to run su - to any user unless you want to give away root.
You should do something like this:

Code:
%appgroup       ALL=(appuser)       NOPASSWD: ALL
they then can run
Code:
sudo -u appuser /some/command
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo cd /root gives 'sudo: cd: command not found'. stf92 Linux - Newbie 4 03-03-2012 09:05 AM
(Sudo) command can't run by sudo rahilmaknojia Linux - Server 8 06-25-2010 09:30 AM
sudo mkinitrd -o /boot/initrd.img-2.6.32.9 2.6.32.9 sudo: mkinitrd: command not foun vishwas181 Linux - Newbie 1 02-27-2010 01:16 AM
sudo -i -u username Xephyr, fails multi Linux - Desktop 1 02-05-2010 04:43 PM
how to get my username from command shell helptonewbie Linux - Newbie 20 10-12-2007 04:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration