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? |
you need to actually tell us what "important commands" we're talking about. Clearly you HAVE added the new user...
|
I want to run
asterisk -rx 'sip reload' from the CLI as the new user |
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?
|
:S I want to create a new user capable to run commands as root
|
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' |
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. |
All times are GMT -5. The time now is 08:11 AM. |