LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2011, 10:51 AM   #1
apsulthan
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
how to use sudo in linux


Hi

How to configure sudo command ?

Please help me

Thanks in advance
 
Old 11-30-2011, 10:57 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Have you searched online and on these forums? There is so much information out there on the interwebs
 
Old 11-30-2011, 03:42 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,986

Rep: Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447
the icon says you are using Cent
Cent( like RHEL and fedora and SL) uses "su" and "su -" by default

now sudo can be set up, but it is not configured by default .
did you look on the CentOS wiki page ?
it is posted in the "tips and tricks"
http://wiki.centos.org/TipsAndTricks/BecomingRoot
 
Old 11-30-2011, 03:54 PM   #4
apsulthan
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
sudo command

Thanks a lot......
 
Old 12-01-2011, 12:36 AM   #5
polpak
Member
 
Registered: Jan 2011
Location: Planet Earth, Australia, NSW
Distribution: openSUSE Leap 42.1 (x86_64)
Posts: 112

Rep: Reputation: 9
Am NON-Technical, and it took me a while to get used to linux's internal help system.


At linux user terminal(OS-prompt) and see your own OS-Linux-Version's information about sudo.

[My version here is openSUSE11.4]

write :-> info sudo




write :-> sudo -h

sudo - execute a command as another user

usage: sudo -h | -K | -k | -L | -V
usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u
user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-g groupname|#gid] [-p
prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s]
[<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-g groupname|#gid] [-p
prompt] [-u user name|#uid] file ...

Options:
-a type use specified BSD authentication type
-b run command in the background
-C fd close all file descriptors >= fd
-E preserve user environment when executing command
-e edit files instead of running a command
-g group execute command as the specified group
-H set HOME variable to target user's home dir.
-h display help message and exit
-i [command] run a login shell as target user
-K remove timestamp file completely
-k invalidate timestamp file
-L list supported sudoers Defaults values
-l[l] command list user's available commands
-n non-interactive mode, will not prompt user
-P preserve group vector instead of setting to target's
-p prompt use specified password prompt
-r role create SELinux security context with specified role
-S read password from standard input
-s [command] run a shell as target user
-t type create SELinux security context with specified role
-U user when listing, list specified user's privileges
-u user run command (or edit file) as specified user
-V display version information and exit
-v update user's timestamp without running a command
-- stop processing command line arguments

:~>
 
0 members found this post helpful.
Old 12-01-2011, 10:08 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,667
Blog Entries: 12

Rep: Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894
To enable sudo in CentOS, you need to edit the sudoers file and add the user's name. The file is heavily annotated.

Use visudo as root to open the editor. It's a special formulation just for editing /etc/sudoers.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 02:36 AM
sudo cd /root gives 'sudo: cd: command not found'. stf92 Linux - Newbie 4 03-03-2012 10:05 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 08:56 PM
Problem with SUDO : sudo: pam_authenticate: Module is unknown cristoph_ Linux - Software 2 03-02-2009 08:12 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 04:20 PM


All times are GMT -5. The time now is 11:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration