LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-27-2013, 09:12 AM   #1
manuel19
Member
 
Registered: May 2010
Distribution: Fedora Core 8 (Werewolf)
Posts: 40

Rep: Reputation: 0
How to add new user in Linux?


Hi. I added a new user to my linux box using
useradd username
passwd username

But this user can't execute some important commands to me.

How to do this user be able to run some applications I want?
 
Old 06-27-2013, 09:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you need to actually tell us what "important commands" we're talking about. Clearly you HAVE added the new user...
 
Old 06-27-2013, 09:28 AM   #3
manuel19
Member
 
Registered: May 2010
Distribution: Fedora Core 8 (Werewolf)
Posts: 40

Original Poster
Rep: Reputation: 0
I want to run
asterisk -rx 'sip reload'
from the CLI as the new user
 
Old 06-27-2013, 09:58 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
sounds like something root would do to me. You need to understand how your existing system works, we dont' know how you've configured it. maybe you need to add this user to a specific group? in /etc/sudoers?
 
Old 06-27-2013, 10:22 AM   #5
manuel19
Member
 
Registered: May 2010
Distribution: Fedora Core 8 (Werewolf)
Posts: 40

Original Poster
Rep: Reputation: 0
:S I want to create a new user capable to run commands as root
 
Old 06-27-2013, 11:31 AM   #6
MichelCote
LQ Newbie
 
Registered: Oct 2009
Location: Laval Québec
Distribution: CentOS 6
Posts: 20

Rep: Reputation: 0
Hi,

I've had similar problem. And a linux admin here in my office showed me how to use SUDO.

I'm still learning in the Linux world (on CentOS actually) so I'm not sure if SUDO is used for all Linux flavours.

Basically you setup your system to use sudo and give different rights for each users. Following link is my quick list reference for sudo related questions, I'm sure there are better sites around and even here... http://itg.chem.indiana.edu/inc/wiki/software/165.html

Note also that if you are personally using root as your main access you should really consider using sudo for yourself as well.

Once you have sudo setup and your users configured to use it he/she will be able to use the command :

Code:
sudo asterisk -rx 'sip reload'
 
Old 07-01-2013, 09:21 PM   #7
kamalmin
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
1) find out 'asterisk' command location

eg :

#whereis asterisk

if it's available in '/bin/asterisk' then

2) add sudo user for running asterisk command

user id 'test' needs to run 'asterisk' command



#visudo

add below line at end of file

test ALL = NOPASSWD:/bin/asterisk

or


echo 'test ALL = NOPASSWD:/bin/asterisk' >> /etc/sudoers


here
test = your user id

/bin/asterisk = command location


replace 'test' and '/bin/asterisk' according to your requirement.


3) execute asterisk command as a sudo command

log in to user id 'test'

then

$sudo asterisk


it should work perfectly , Please let us know is you still facing this issue.
 
  


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
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
How to edit PAM DB of VSFTPD (..add user, delete user, change user password ) jsaravana87 Linux - Server 1 10-02-2012 08:49 AM
linux user add delmoras Linux - Newbie 4 12-22-2008 05:11 PM
Linux - How to add a new user with the same root/super-user's privileges? asgarcymed Linux - General 8 12-23-2006 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:38 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