Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-04-2009, 02:45 AM   #1
Registered: Nov 2009
Posts: 49

Rep: Reputation: 15
Problems installing firewall script


I've created a firewall script in my management workstation and am suppose to install the script in the firewall machine which is my local server.

I'm only using one interface for the firewall as it is only to protect the server and not the whole network. The address of the interface (internal address/inside address) is The management workstation address is

I've already created a user(fwadmin), a group(fwadmin), and the directory /etc/fw where the firewall script should be installed and activated.

I want to use user account and not root account to manage the firewall script in the firewall machine. Does this mean that I have to login as fwadmin in the firewall machine and not root?

Now I type this command in the console of the management workstation (where the firewall script is created).

ssh fwadmin@ sudo -S /etc/fw/New.fw

This is to login to the firewall machine as user fwadmin and copy and activate the firewall script(New.fw) there.

The output that I get is
id : cannot find name for group id 502.

I've already set the permissions for /etc/passwd and /etc/group as 644.

Pls help me solve this problem.

Last edited by anaigini45; 12-04-2009 at 02:48 AM.
Old 12-05-2009, 12:56 PM   #2
Senior Member
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Originally Posted by anaigini45 View Post
ssh fwadmin@ sudo -S /etc/fw/New.fw

This is to login to the firewall machine as user fwadmin and copy and activate the firewall script(New.fw) there.
If you're logging in as the user who presumably owns /etc/fs/New.fw, why are you using sudo at all? Also, note that your command doesn't copy anything. Read the scp(1) for that. To call the script, from a remote machine, you'll want to do something like

ssh fwadmin@ ./etc/fs/New.fw

I'm assuming that this is a Bash script that is tested and working locally, and has the correct permissions set.

Also, you had a question about root: it, as always, can do absolutely anything, including as a subset, anything that user fwadmin can do.


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
My firewall script gabsik Linux - Security 2 04-08-2006 02:19 PM
Firewall script simcox1 Linux - Security 7 11-13-2005 01:08 PM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 10:15 PM
IP TABLES Firewall Script problems... Nosram Linux - Networking 2 02-11-2004 05:22 AM
Firewall script help!!!! cirkut5732 Linux - Newbie 8 04-17-2003 07:09 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration