Sponsored Content
Top Forums Shell Programming and Scripting Will Chkconfig works for normal user apart from root user Post 302980365 by praveena kotapa on Friday 26th of August 2016 10:26:56 AM
Old 08-26-2016
Will Chkconfig works for normal user apart from root user

Hi,

I am trying to schedule a script that starts on reboot.I came across chkconfig utility to schedule scripts on reboot.
Problem here is can i how to use this chkconfig to schedule a script that runs a s normal user.
Or if there is any other function to schedule on reboot as normal user please suggest

Regards,
Praveena.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies

2. Shell Programming and Scripting

switching between root and a normal user

I am writing a script that has some tasks that must be run as root, then set of tasks to be run as normal user, then again as root. is there a way to switch between users in a script? any other alternatives? thx (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

3. Shell Programming and Scripting

su root from normal user

Got a cron to run everyday under my user. this cronjob runs a script from my /home/jack/scripts/run.sh clear # # su to root and run a script, return with result # su - # passwd # run /getfile.sh # return with result # the result will copy 2 files from /prod/app/logs/ and... (0 Replies)
Discussion started by: karthikn7974
0 Replies

4. Shell Programming and Scripting

How a normal user run a script including root privileaged commands

Dear all Ihave written a script in Hpux9.0, the ecript is working fine if I run it from root command prompt But when I am running it thru /etc/profile or /user/.profile and login as a normal user, the owner of the process running the script is the normal user & hence cant run a root privileaged... (7 Replies)
Discussion started by: initin
7 Replies

5. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

6. Shell Programming and Scripting

Execute Root command as Normal user

Hi, We need to execute a root commmand to change the expiry period of a user but we are getting error as permission denied Q How can we execute a root command by a normal user ? :mad: any thing or suggestion will be good .... :b: (3 Replies)
Discussion started by: abhishek1979
3 Replies

7. AIX

How to change normal user id to LDAP user id?

If I create a new user id test: mkuser id=400 test then I want it to LDAP user: chuser -R LDAP SYSTEM=LDAP registry=LDAP test It shows: 3004-687 User "test" does not exist. How to do? (4 Replies)
Discussion started by: rainbow_bean
4 Replies

8. Solaris

java version mismatch for normal user and root user

:confused: I installed latest version of java ( jre 1.6) on Solaris Machine ......when I run java -version as root, shows the latest version but when I run java -version as normal user, shows the old / previous version What should I do to fix this ...should show the latest version... (3 Replies)
Discussion started by: frintocf
3 Replies

9. UNIX for Dummies Questions & Answers

Execute a command as root from normal user

Hi , I am trying to stop and start a process using the below code. I have sudo access on my machine ## PID = process id echo "$PASSWD" | sudo -S kill -9 <PID> echo "$PASSWD" | sudo -S /opt/abc/startserver /opt/abc/startserver: error while loading shared libraries: librts.so: cannot open... (6 Replies)
Discussion started by: rakeshkumar
6 Replies

10. UNIX for Dummies Questions & Answers

Switching from root to normal user takes me to user's home dir

Whenever i switch from root to another user, by doing su - user, it takes me to home directory of user. This is very annoying as i want to be in same dir to run different commands as root sometimes and sometimes as normal user. How to fix this? (1 Reply)
Discussion started by: syncmaster
1 Replies
CHKCONFIG(8)						      System Manager's Manual						      CHKCONFIG(8)

NAME
chkconfig - enable or disable system services SYNOPSIS
chkconfig -t|--terse [names] chkconfig -s|--set [name state] chkconfig -e|--edit [names] chkconfig -c|--check name [state] chkconfig -l|--list [--deps] [names] chkconfig -A|--allservices chkconfig -a|--add [names] chkconfig -d|--del [names] DESCRIPTION
chkconfig is used to manipulate the runlevel links at boot time (see init.d(7)). It can be thought of as a frontend to insserv(8). Chk- config can run in six different modes: terse list mode, set mode, edit mode, list mode, add mode and delete mode. The last three modes were added for compatiblity reasons. TERSE LIST MODE
This mode lists the state of the specified services, or all known services if no service name was provided. Every printed line consists of the name of the service and the runlevels the service is configured for at the moment. If it is configured in no runlevel, off is used instead, if it is configured in the runlevels defined as a default by the start script, on is used. If the service is an enabled inetd or xinetd service, inetd and xinetd are used. Inetd/xinetd services are configured in /etc/inetd.d and /etc/xinetd.d, respectively. You can use the -A or --allservices parameter to get all services (even the boot.*-services) listed. If chkconfig is called without arguments, all services are listed in terse mode. SET MODE
Set mode is used to configure at which runlevel a service should be started. The arguments must be specified as pairs of service name and new state. You can use on and off as special states to select the default set of runlevels or to disable a service completely. You can use inetd or xinetd to configure a service managed by the inetd/xinetd daemons. Insserv can calculate dependencies for only one service at the same time. To work around this limitation imposed by insserv, chkconfig uses the '-f' option of insserv when it reads the list of services from standard input. Note that --force switches off all dependency checks and could lead to depending services no longer working, use with care. If no services are specified, chkconfig reads lines from standard input. Each line must consist of a service/state pair. As this is exactly the output of the terse list mode, this can be used to reconfigure a service specification saved by a former run. If the option -f or --force is also given, insserv is called with a '-f' option. EDIT MODE
This mode is a combination of the terse list mode and set mode. It writes the state of all specified services (or all known services, if no service was provided) into a temporary file, starts an editor and re-configures all services to reflect the states of the changed tempo- rary file. CHECK MODE
This mode can be used to check the state of a service. chkconfig exits with a return code of '0' if the service is enabled in all of the specified runlevels, otherwise the exit status is '1'. If chkconfig is called with only a service name the current runlevel of the system is used for checking. LIST MODE
List mode prints for each specified service a line that consists of the service name and for runlevels zero to six on or off depending if the service will be started or not. on will be printed in bright green if the output is written to a terminal. If the --deps option is given, the names of the services that must be started before this service is appended to each line. The inetd/xinetd services are listed in extra sections. You can use the -A or --allservices parameter to get all services (even the boot.*-services) listed. ADD MODE
Calls insserv to enable a service and uses list mode to display the new setting afterwards. DEL MODE
Same as add mode, but disable the service. OTHER OPTIONS
When no service names are given on the command line, chkconfig defaults to all known services excluding those that are not enabled in run- levels 1 to 6 and start with 'boot.'. Use the --allservices or -A option if you want to see such services as well. EXAMPLES
chkconfig list the runlevel configuration of all known services chkconfig apache list the runlevel configuration of the apache web server chkconfig -t apache xntpd list the runlevel configuration of the apache web server and the network time protocol daemon. chkconfig apache on configure the apache web server to be started on next boot time. chkconfig apache 5 configure the apache web server to be started only if the system reaches runlevel 5. chkconfig apache 35 configure the apache web server for runlevel 3 and 5. chkconfig apache on xntpd off configure two services chkconfig finger xinetd configure a xinetd service chkconfig -A >~root/chkconfig.save backup the current configuration chkconfig -s <~root/chkconfig.save restore the configuration chkconfig -e apache xntpd change the runlevel configuration interactively chkconfig -e change the runlevel configuration of all services interactively FILES
/etc/init.d/ path to the boot script base directory as required by the Linux Standard Base Specification (LSB). /etc/inetd.d/ path to the inetd services. See the inetd manpage to find out how to enable this feature. /etc/xinetd.d/ path to the xinetd services. SEE ALSO
init.d(7), init(7), inetd(8) xinetd(8) insserv(8) COPYRIGHT
2003 SuSE Linux AG, Nuernberg, Germany. AUTHOR
Michael Schroeder <mls@suse.de> Oct 2006 CHKCONFIG(8)
All times are GMT -4. The time now is 09:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy