[SOLVED] NS2 runs as root user and not as other user
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,399
Rep:
May be you did set all the PATH's as root ? ?
"Users" have their own path's , and the ns-allinone
path's must be set for each user.
.....
Or avoid having any PATH issues at all, just install
a few files into the system path's , post # 13 here http://www.linuxquestions.org/questi...ora-11-750634/
.....
.....
Other ns2 info : LQ Search > > Tagname = ns2
.....
Using ' ex1.tcl ' : The command is : ' ns ex1.tcl '.
If you do ' ns <Enter> ' , you get the ' ns shell ',
which is for other purpose.
.....
Thanks knudfl.
But I have already edited the ~/.bashrc separately for the other user. And the paths are set correctly I am sure. Even then this happens ?
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,399
Rep:
I guess, you will have to build ns-allinone in your /home/
to have the right permissions.
/root/ is not the location to keep it in. No users can read or
access that directory, and thus not use any files inside /root/.
/root/ is not supposed to be used for anything . Never !
A standard build location : /home/'user'/ns2/ns-allinone-2.32/
but /usr/local/ns2/ may be usable too.
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,399
Rep:
" chown -R mq15 /home/Program_Files " etc.
Looks for me, that you just moved or copied the whole
folder ns-allinone-2.32/ from /root/ ? ?
And the "new folder" is not to be in /home/'new-folder',
but /home/"user"/'new-folder'/ . Else you will have
similar permissions problems again. !
Better start from scratch in another folder with a new
name like /home/mq15/ns2/ to be absolute sure for it
to work.
And please run all commands as the ordinary user. No 'su'.
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,399
Rep:
Well then let us try this :
Log in to your username.
Open the terminal window and type ...
1) mkdir ns2
2) cd ns2/
3) ... ... ... ... copy or move the ns-allinone-2.32.tar.gz into ns2/
4) tar xvf ns-allinone-2.32.tar.gz
5) cd ns-allinone-2.32/
6) ./install
..... And please use the finishing text to set the new paths.
..... May be copy / paste that text to a text file to have a backup.
.....
.....
.....
Thanks knudfl for your help...
The problem has been solved. I removed ns-allinone-2.32, installed ns-allinone-2.34, updated ~/.bashrc and sourced it. Then updated and sourced the ~/.bashrc separately for other user.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.