Operating System - HP-UX
1832897 Members
2459 Online
110048 Solutions
New Discussion

Re: doubt on the permission of /dev/ether0

 
Vishal Augustine
Frequent Advisor

doubt on the permission of /dev/ether0

Hi,

My system startup-file - /sbin/init.d/hpbase100 - has the following entry
#######################################
C_MAJOR=$(/usr/sbin/lsdev -h -d btlan3 | awk '{print $1}')

if [ -a /dev/lan0 ]; then
LAN0_MAJOR=$(/bin/ll /dev/lan0 |awk '{print $5}')

if [ $C_MAJOR -ne $LAN0_MAJOR ]; then
/bin/rm /dev/lan0
fi
fi

if [ ! -a /dev/lan0 ]; then

/sbin/mknod /dev/lan0 c $C_MAJOR 0x000000
/usr/bin/chmod 0666 /dev/lan0
fi

if [ -a /dev/ether0 ]; then
ETHER_MAJOR=$(/bin/ll /dev/ether0 |awk '{print $5}')

if [ $C_MAJOR -ne $ETHER_MAJOR ]; then
/bin/rm /dev/ether0
fi
fi

if [ ! -a /dev/ether0 ]; then

/sbin/mknod /dev/ether0 c $C_MAJOR 0x000001
/usr/bin/chmod 0666 /dev/ether0
fi
##########################################

My /dev/ether0 has the permission 0666.

Is this permission really required ? Will it not cause some security issues ?

Thanks and Regards
Visha
10 REPLIES 10
harry d brown jr
Honored Contributor

Re: doubt on the permission of /dev/ether0

I guess it could cause security issues, but I'm not sure I would change it, especially if this machine is a production machine.

My hpbase100 does not have that for 10.20. What OS are you running?

live free or die
harry
Live Free or Die
Victor_5
Trusted Contributor

Re: doubt on the permission of /dev/ether0

I checked my machine, it is the same permissions, although they have "w" permission which maybe is a security hole, I don't suggest you change them, just leave them there.
Vishal Augustine
Frequent Advisor

Re: doubt on the permission of /dev/ether0

It is a k580 10.20 system ...

I checked it on other 3 k580, 10.20 and found the same !!!

Vishal
S.K. Chan
Honored Contributor

Re: doubt on the permission of /dev/ether0

I noticed all of ours has permission set to ..
crw-r--r-- bin:bin
for both ether0,ether1,lan0 and I couldn't find any chmod statement in the startup file.
I'm suspecting your startup file has the chmod line purposely added to it.
Under normal circumstances there shouldn't be a need for the permission to be world-writable.
MANOJ SRIVASTAVA
Honored Contributor

Re: doubt on the permission of /dev/ether0

Hi Vishal

Even we have the same permissions and I am attaching a copy og hpbase100 so that you can cross check it ,there is definaltely a security concern as I am also thinking now on the same lines.


Manoj Srivastava
MANOJ SRIVASTAVA
Honored Contributor

Re: doubt on the permission of /dev/ether0

Hi Vishal

Even we have the same permissions and I am attaching a copy og hpbase100 so that you can cross check it ,there is definaltely a security concern as I am also thinking now on the same lines.


Manoj Srivastava
Pete Randall
Outstanding Contributor

Re: doubt on the permission of /dev/ether0

Vishal,

I've checked my N4000 running 11.0, my K570 running 11.0, and my C3000 running 11i. They all have the exactly the same permissions as yours. I would leave them alone.

Pete

Pete
Sridhar Bhaskarla
Honored Contributor

Re: doubt on the permission of /dev/ether0

I do not know if it is a security concern. An ordinary user cannot remove it but will need to perform write operations in the network stack.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
cart
Advisor

Re: doubt on the permission of /dev/ether0

We've asked our HP support and they told us not to change it...

S
Vishal Augustine
Frequent Advisor

Re: doubt on the permission of /dev/ether0

But why such permission ... there shud be some reason ? Do you know the reason ?

Vishal