General :: Why Is Sudo Required To Start Up A Webserver On A Given Ip:port

May 28, 2011

I'm setting up a Python-based webserver on my Debian box. Setup: The Debian OS is VM based, but I've switched the VirtualBox from NAT to Bridged. IP of the VM setup = 192.168.1.7 (per my router's admin screen or ifconfig). I've succesfully set up my router's port forwarding for both ssh and HTTP. I've successfully set up my router's dynamic dns using [URL].

Regardless of the specific Python webserver I'm using (Django, CherryPy, standard library), I have to start the webserver @ 192.168.1.7:80 using sudo. Otherwise I get an error about not having permission to access the port. None of the webserver tutorials mention needing to use sudo when specifying an ip:port.

Question: why do I need to use sudo to start these webservers? Is it an indication that I shouldn't be using 192.168.1.7? Or that I'm not setting a config file properly somewhere?

View 2 Replies


ADVERTISEMENT

Programming :: Automate The Password Prompt Required For Sudo Commands?

May 31, 2011

I have written a script to run commands on remote servers, it is working fine. But when I am running "sudo commands" on the remote servers, it asks for me password after prompting for ssh password. I am unable to automate this password prompt (which is just after ssh password prompt). This is the function I am using to provide passwords

Code:

pass ()
{
cd $DIR/"$dt1"_"$dt"
/usr/bin/perl << 'EOF'
use strict;

[code]....

I want the same function to be used , when it expects for sudo passwords for any of the below lines:

Code:

[sudo] password for vikas: orPassword: This is my "cmd" file passed in pass () function.

Code:

ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 192.168.1.100 "bash rcmds"

This is my script output

Quote:

[vikas@box1 ~]$ ./rscript.sh
++ rm -rf /home/vikas/May_31
++ mkdir -p /home/vikas/May_31
++ set +x

[code]....

how to automate the password prompt required for sudo commands.

View 8 Replies View Related

Server :: Accessing Internal Webserver From Public Webserver

Dec 18, 2009

Ok let's say I have Apache Webservers on 2 different machines within my network, I have http://outterABC.com setup at dyndns.org to point to my modem at home, and my router forwards Port 80 to the ServerA Machine (i.e. 192.168.0.3). I can access my webpage I setup for the Server A Machine.

But what I want to try and do is somehow access my ServerB machine's website that is on my same network. I tried something like this http://ServerB.outterABC.com and the apache page came up with something like the page wasn't available. I want to access the content of the ServerB website, but because I have only one router, i can only forward Port 80 site traffic to my ServerA machine's website. I'm sure it's a different syntax I should use but i'm just not sure what I should enter to bring up the apache root web page for the Server B website via http://outterABC.com

I tried setting up DNS A records on ServerA, but I don't think it will work with what i'm trying to do above.

View 1 Replies View Related

Ubuntu Servers :: Installing Zend Server \ When Log In To The Admin Interface, It Told It Couldn't Start The Webserver?

Oct 18, 2010

I had installed apache previously on my system, and I think I uninstalled it completely, although remnants might have remained. I have just installed zend server ce php 5.3, and I am having trouble getting it to work. When I log in to the admin interface, it told me it couldn't start the webserver, so I go to restart apache, and it gives me this:* Starting web server apache2 Syntax error on line 6 of /etc/apache2/sitesenabled/zendserver_gui.conf:Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configurationThis has to do with php_mod some how... but I am not sure how to fix this, or where to start, since I am relatively new to actually setting up apache.I thought this might have something to do with libapache2-mod-php... so I went to reinstall it, and ran this:

mburns@mb2449-laptop:~$ sudo aptitude install libapache2-mod-php5
Reading package lists... Done
Building dependency tree

[code]....

View 2 Replies View Related

Programming :: Have Several Scripts In /etc/rcS.d/ Directory Which Are Required To Run On Start Up

Sep 20, 2010

I have several scripts in /etc/rcS.d/ directory which are required to run on start up.Now I have written a new script, and I want it to be run during the system start up itself (Not in any runlevel). SoI have given the default start as,# Default Start :SBut when I use the command : "update-rc.d test_script.sh defaults".....it is creating symbolic links to/etc/rc0.d /etc/rc1.d ..../etc/rc6.d.But I actually need a symbolic link in the /etc/rcS.d/ directory.Is there is any way to achieve this ( I tried manullay creating a link in /etc/rcS.d, but that is not running the script on system start up).

View 1 Replies View Related

General :: Startup - Automate "sudo Chmod A+r /dev/usb/hiddev0" Upon Start?

Oct 22, 2010

I have a footpedal and fortunately there is a software for using it under linux (see [URL]). The author of that software already solved an issue for me (see issues there), but there is no option to ask simpler questions.

Unfortunately prior to use the software I have to change the device permission each time I start linux. How could I change that to be done automatically at startup?

View 4 Replies View Related

General :: Sudo Cd /root Gives Sudo - Cd - Command Not Found

Jan 6, 2011

Kernel 2.6.21.5, Slackware 12.0

Code:

Code:

On the other hand

Code:

So, I do not understand why the notification "sudo: cd: command not found", considering cd is a bash built-in command.

View 3 Replies View Related

Ubuntu :: How To Start Certain App As Sudo

Jul 18, 2010

I seem to only be able to start checkgmail as root. I have it listed as a startup application, and in the command line I entered gksudo [path to file]. How do I make it remember the password at each startup?

View 9 Replies View Related

Fedora Installation :: 11 Sudo Has A 20 Second Start Delay?

Jun 11, 2009

i'm using Fedora 11 which i installed a couple of days back... i added my user name to the sudoer list but everytime i run the sudo command it takes at least 20 + seconds before anything happens... this happens everytime i run sudo... in comparison to running su things happen immediately... anyone else experiencing this? now everytime i install or run a command requiring root access i just use su...

View 7 Replies View Related

OpenSUSE :: Wireshark - Unable To Start In Sudo

Sep 14, 2010

Install wireshark and added it to visudo. But wireshark refused to start in konsole

Code:

# sudo wireshark

(wireshark:7493): Gtk-WARNING **: cannot open display:

However, wireshark will start without problem when in root.

View 6 Replies View Related

Ubuntu :: Wireshark Automatically Start With Sudo?

Feb 2, 2011

I am trying to use wireshark on my ubuntu 10.10 laptop. However I have found out that wireshark will only detect my network cards when it is started with root permissions. How would I make it automatically start with root permissions?

View 2 Replies View Related

Slackware :: Start Thunar As Root - Won't Run After Sudo

Jun 1, 2011

I have been using ubuntu or a derivative distro and perhaps I grew too used to sudo. If it matters I am on Slackware 13.37 and xfce4. I was able to adjust sudoers to allow sudo but I am having difficulties running some progs as root. The biggest concern is trying to start thunar as root. It wont run after sudo, su, or su -l. What am I doing wrong?

View 10 Replies View Related

Ubuntu :: Chmod - Can't Run Sudo Or Start Network Manager

Jul 27, 2010

Recently i was fixing a permissions error on my home folder. In the process i ran accidentally chmod 777 in the root directory. BIG mistake. Now i cant run sudo, or start network manager. I am currently on vacation and made a bootable version ov ubuntu on my flash drive, but i wouldn't boot. I think it is because i chmod'ed the grub folder (with is in the root) I have a boot CD a home, but is there anyway to fix it beforehand?

View 7 Replies View Related

Ubuntu :: Find Start And End Sector Of Partition With Sudo-command?

Jun 18, 2010

How to find Start and end sector of partition with sudo-command?

View 2 Replies View Related

Ubuntu Networking :: How To 'sudo Cable-start' Automatically On Boot

Feb 19, 2011

i use ubuntu 10.10 installed in wubi on my girlfriend's machine.in order to connect to the internet i had to install a dialer script and then i need to type in terminal: sudo cable-start and then password BUT i wish this to happen automatically when booting the machine.i am sure that it is possible, but have no clue how to do it.

View 3 Replies View Related

Ubuntu :: Nautilus Won't Start Without 'sudo' - Failed To Get Current CK Session

May 21, 2011

Running natty (latest upgrade), and i'm having nautilus issues. If i type

Code:
nautilus
into the terminal, i get nothing. no errors, no text, and no window.

If i type

[code]....

View 7 Replies View Related

Ubuntu :: Creating A Text File To Start Up Sudo Bash Without Going To The Terminal?

Feb 26, 2011

I just set up apache on my PC and I cant change the permissions by right clicking because "I'm not the owner" and instead of using the chmod command on every file that I would like to edit I would just like to write a script on a text file, save it to my desktop so all I have to do is double click on it and boom I can edit all my files, etc.

View 2 Replies View Related

General :: What's The Difference Between Sudo Su - And Sudo -i

Jun 19, 2011

It is my understanding that they do the same: they ask for my password (if I am allowed in /etc/sudoers), and give me a login shell as root.

Is there any difference between them?

sudo su -
sudo -i

Also, what's the difference between

sudo su
sudo -s

I think that they both ask for my password, and give me a shell with my old environment variables.

View 1 Replies View Related

General :: Having A Dns Server And Webserver On The Same Machine

Sep 3, 2010

I have one desktop machine with fedora 11 installed and a Laptop with both linux and Windows Xp. I use the laptop as my client machine.

I want to set up both a dns and web servers on the same machine for testing and practise purposes.

how to do it bcoz I can set up the webserver but I can't browse the website on the Fedora machine when I use my laptop. I have learnt that I should set up a Dns server.

View 1 Replies View Related

General :: Setting Up A Webserver In Ubuntu 9.10?

Sep 1, 2010

i am planning to setup a Web server on AWS Cloud Platform.The requisites are

ubuntu karmic 9.10
Java - 1.6.0_20
Tomcat - 6.0.29
Apache - 2.2.14
Mysql - 5.1.41-3ubuntu12.6

Since i am not much familiar with Ubuntu,Shall i go for apt-get install or download source and compile each application.

View 4 Replies View Related

Debian Configuration :: Visudo To Authorize User To Start Only One Application With Sudo On One Peculiar Host

Jul 14, 2015

I would like to configure visudo to authorize user to start only one application with sudo on one peculiar host and forbid everything else so, after reading the man, I came up with :

Code:

Select alluser       ALL = (ALL:ALL) !ALL
user       host_name = /usr/bin/application

But it does not seem to work.

View 2 Replies View Related

General :: SFTP Server Port Blocked On Uni Network / Need To Change Listening Port

Oct 21, 2010

VERY new to linux, erm but I have an issue that needs solving!I recently moved to university, where their network blocks sftp port 22, this means that I cannot connect to my FTP server which is running a version of linux.Now I've got this ftp server connected to a seedbox and it was created using the following walk through..Code:I have written this guide for a friend, but I though it would be useful for others as well.

There are several guides floating around, but I found that most always cock up in some way. This one is tried and tested to work on Debian Etch (on an OVH rps, but should apply to most servers).If there is a new stable release of rtorrent/libtorrent then I will update this guide to show you how to update it (without reinstalling the whole server).

At the bottom there are also instructions to install ftp access & some network monitoring software.Basically, I would really like someone to be able to construct the commands on how to change the listen port for sftp connection on linux or add another port to the list that Linux would use so that I could put in through putty.

View 2 Replies View Related

General :: Warning: Remote Port Forwarding Failed For Listen Port 7869

Jul 20, 2010

I tried to make "ssh tunneling", but failed and got this message.

Quote:

Administrator@windstory-PC /
$ ssh -R 7869:localhost:7869 windowsstudy@192.168.0.4
windowsstudy@192.168.0.4's password:

Warning: remote port forwarding failed for listen port 7869 Last login: Wed Jul 21 01:56:04 2010 from 192.168.0.2 -bash-3.2$

1. system environment

192.168.0.2 - windows 7 + copssh
192.168.0.4 - centos 5.4 x86 + openssh

2. Guide for setting "ssh tunneling"

[URL]

3. Added this to sshd.conf

Quote:

AllowTcpForwarding yes

4. "netstat -na|grep 7869" at 192.168.0.4

Quote:

[root:maestro:~]# netstat -na|grep 7869
tcp 0 0 0.0.0.0:7869 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:7869 127.0.0.1:53539 ESTABLISHED

[code]....

5. result of "ssh -vvv -R 7869:localhost:7869 windowsstudy@192.168.0.4"

Quote:

debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password

[code]....

6. I added 7869 for telnet service as follow;

Quote:

mytelnet 7869/tcp # My Telnet server

View 1 Replies View Related

General :: How To Optimize Ubuntu Desktop To Run Webserver

Jan 30, 2011

I am using ubuntu desktop edition to run My drupal website on Intranet. I know for running web servers best thing to install is ubuntu server editions, but due to some problem i am using Desktop edition.I installed XAMPP on my machine an my website is up and running. I want to know how can i optimize my machine?? Since I will not use very less features of desktop editions are there any things which I can remove or stop which will free memory and cpu consumption, are there any packages which i should install to increase the performance of my ubuntu??

View 3 Replies View Related

General :: Good Tutorials To Create A Webserver?

May 24, 2010

I was wondering is there any good tutorials on how to create a good webserver... i have found a few but i was just trying to verify the info on the ones that i found.

View 2 Replies View Related

General :: Taking Specific Ip To Local Webserver

Oct 21, 2009

For some purpose in my home network I want to get a specific ip to my localhost on that machine.Like say I typed 123.123.123.123 I want that go to localhost.

View 3 Replies View Related

General :: Local Webserver Running Slow

Nov 2, 2010

for some reason when we browse our website on our local webserver (test environment) the pages load very slow.
There is no lack of memory, no lack of disk space, no lack of CPU power and as far as I know our network is very fast.Don't know where to begin looking, any suggestions ?

View 14 Replies View Related

General :: Remote Webserver And Sshd_config File?

May 5, 2011

I wanted to add a user to have permission to login to our webserver. Foolishly I did not back this file up. The only thing I changed was the last part of the file which was:

# override default of no subsystems
AllowUsers chris acosentino
Subsystem sftp /usr/libexec/openssh/sftp-server
to
# override default of no subsystems
AllowUsers acosentino techmaster
Subsystem sftp /usr/libexec/openssh/sftp-server

Now I'm still connected with that terminal, but any other attempt to get into the webserver from either a new terminal or from winscp results in:ssh_exchange_identification:Connection closed by remote host.If I lose connection to this last terminal I guess I'll be screwed.

View 2 Replies View Related

Software :: Can't Get Webmin To Start - Port Conflict

May 4, 2011

I just installed webmin on a server, installed successfully, i even added port 10000 into iptables for good measure, and restarted the server for good measure. I can't access the webmin page, so i tried a /etc/webmin/start and it gave the following error:

So i did a netstap -nap and found these two for port 10000

Does anyone know what I'm missing to get this going? this is my first webmin install, and i'm not having much luck

If I stop and start webmin, it starts fine, guess it starts automatically, but the page won't come up when i browse to [url]. In iptables, shown completely below, i added the line before COMMIT, is that not the correct way to add it?

View 6 Replies View Related

CentOS 5 :: Application Is Getting New Port Every Time Start?

Jun 24, 2010

I have written simple application in CPP which listens on port 8080. But when I start the application and check the port it is listening on (using netstat -nap), I can see that the application is listening on port which is > 30000.

This port number keeps on changing if I re-run the application.

if I have to do any kind of a seeting so that application starts listening on 8080 port.

I am using CentOS 5.5 (I tried same on CentOs 5.2)

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved