Sponsored Content
Top Forums UNIX for Advanced & Expert Users Non root user access to /dev/mem Post 303021417 by Neo on Thursday 9th of August 2018 06:47:54 AM
Old 08-09-2018
HINT3:

Here is a file from a Linux server:

Code:
root@www:/etc/rc.d/init.d# ls
monitorix
root@www:/etc/rc.d/init.d# cat monito*
#!/bin/bash
#
#	/etc/rc.d/init.d/monitorix
#
# Starts the Monitorix daemon
#
# chkconfig: 2345 99 10
# description: Monitorix is a lightweight system monitoring tool
# processname: monitorix
# config: /etc/monitorix.conf
# pidfile: /var/run/monitorix.pid

### BEGIN INIT INFO
# Provides:          monitorix
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start up the Monitorix daemon
# Description:       Monitorix is a free, open source, lightweight system
#                    monitoring tool designed to monitor as many services and
#                    system resources as possible.
### END INIT INFO

# Source function library
. /etc/init.d/functions

if [ -f /etc/sysconfig/monitorix -a $UID -eq 0 ]; then
	. /etc/sysconfig/monitorix
fi

RETVAL=0
PROG="monitorix"
DAEMON="/usr/bin/monitorix"
PIDFILE="/var/run/monitorix.pid"
CONF="/etc/monitorix.conf"

start() {
	if [ ! -f /var/lock/subsys/$PROG ] ; then
		echo -n $"Starting $PROG: "
		daemon $DAEMON -c $CONF -p $PIDFILE $OPTIONS && success || failure
		RETVAL=$?
		if [ $RETVAL -eq 0 ] ; then
			touch /var/lock/subsys/$PROG
			echo
		fi
	fi
}

stop() {
	echo -n $"Stopping $PROG: "
	killproc $PROG
	RETVAL=$?
	rm -f /var/lock/subsys/$PROG
	rm -f $PIDFILE
	echo
}

restart() {
	stop
	start
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		restart
		;;
	condrestart)
		if [ -f /var/lock/subsys/$PROG ] ; then
			restart
		fi
		;;
	status)
        	status $PROG
		;;
	*)
		echo $"Usage: $0 {start|stop|restart|condrestart|status}"
		exit 1
esac

exit $RETVAL

Reading the files on your Linux server will provide you with a vast amount of knowledge.
This User Gave Thanks to Neo For This Post:
 

10 More Discussions You Might Find Interesting

1. HP-UX

user commands without root access

Hi I have been asked to find out how to 1) create users 2) reset passwords 3) kill processes that may require root privileges without having root password, sudo rights or rights to passwd command Any ideas? Thanks in advance (1 Reply)
Discussion started by: emealogistics
1 Replies

2. Programming

/dev/mem on Dell Poweredge

Hi, I have a C++ program to access /dev/mem and retrieve details like Vendor, Manufacturer details of the motherboard. This works fine on all the machines except for on Dell Poweredge 2850,1950... machines. I receive a 'EFAULT' when I try to access /dev/mem on these servers. I suspect some... (1 Reply)
Discussion started by: ragisreekanth
1 Replies

3. Solaris

I can not access root user through LAN

Dear i have installed Solaris 10 on SUN V240 after installation i can not access system through root user if i access system through any other user it conects but root is not connecting through LAN if i connect through SC and then access root though cosole -f command it also works kindly... (6 Replies)
Discussion started by: rizwan225
6 Replies

4. Shell Programming and Scripting

access user history as root

Hi, I need to access a user's command history. However, the dilemma is that he is logged in and so his current history is not yet flushed to .bash_history file which gets flushed when he logs out. Is there a way I can still access his most recent history? thank you, S (4 Replies)
Discussion started by: sardare
4 Replies

5. Solaris

Non-root user access to privileged ports-Solaris 8

Please let me know how to setup a non-root user to be able to access a privileged port (<1024) on Solaris 8. I am currently running tomcat as "tomcat" user and I get the following error during to start up: SEVERE: Error initializing endpoint java.net.BindException: Permission denied<null>:443 (5 Replies)
Discussion started by: pingmeback
5 Replies

6. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

7. Shell Programming and Scripting

How to give root access to non root user?

Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal. I want to give some users a root level access. Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way Regards ADI (4 Replies)
Discussion started by: adisky123
4 Replies

8. UNIX for Advanced & Expert Users

One user to su to another without allowing root access and password

Hello Gurus, I want One user to su to another without allowing root access and password. I want to run a specific command as below from user am663: --------------------------------------------------------- sudo -u appsprj4 /home/appsrj4/scripts/start_apache.sh ------------------- But... (6 Replies)
Discussion started by: pokhraj_d
6 Replies

9. Solaris

Sudo access of rm to non-root user

Hello, It is Solaris-10. There is a file as /opt/vpp/dom1.2/pdd/today_23. It is always generated by root, so owned by root only. This file has to be deleted as part of application restart always and that is done by app_user and SA is always involved to do rm on that file. Is it possible to give... (9 Replies)
Discussion started by: solaris_1977
9 Replies

10. AIX

Best practices for sugroups for root ? backdoor user access ?

greetings, just ran across a fun situation we had overlooked. We have a backdoor user, no special privileges, which we put on every server so that anyone in the shop can get in (passwd in vault) if they need to, even if they don't have a local account on that server. The point of course is to... (3 Replies)
Discussion started by: maraixadm
3 Replies
NETDUMP-CLIENT(8)						  System Programs						 NETDUMP-CLIENT(8)

NAME
netdump - send oops data and memory dumps over the network SYNOPSIS
/etc/init.d/netdump (start|stop|status|restart|propagate) DESCRIPTION
Loads and configures the netdump kernel modules. Once these are loaded, when the kernel crashes it will send the oops message and a dump of physical memory to the machine that runs the netdump-server. This can then be used to debug the problem using gdb and a kernel image. OPTIONS
start Starts the netdump client service. Loads the kernel modules with the right options. stop Unloads the kernel modules. status Shows the status of the netdump client restart Restarts the netclient modules with new configurations. propagate Sends the ssh public key needed to update the random key for each netdump session to the netdump server. FILES
/etc/sysconfig/netdump Configuration for the netdump client. You need to at least specify the address of the machine running the netdump server here. /etc/sysconfig/netdump_id_dsa.pub Public key for this machine. Used by the server to authenticate the client. This must be installed on the server, possibly by using the the propagate capability of the netdump init script, which does: cat /etc/sysconfig/netdump_id_dsa.pu | ssh netdump@$NETDUMPADDR cat '>>' /var/crash/.ssh/authorized_keys2 Where $NETDUMPADDR is the ip or name of the machine running the netdump server. SEE ALSO
netdump-server(8), init(8) BUGS
Report any bugs you find to http://bugzilla.redhat.com/bugzilla AUTHOR
Alexander Larsson <alexl@redhat.com> Linux 14 Feb 2002 NETDUMP-CLIENT(8)
All times are GMT -4. The time now is 07:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy