Sponsored Content
Full Discussion: Change user in script
Top Forums Shell Programming and Scripting Change user in script Post 302801191 by SkySmart on Wednesday 1st of May 2013 02:18:43 PM
Old 05-01-2013
like if you replace the "$0" with the actual path of to the script, it hangs.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How would I telnet & change user password automatically in a script

I would like to create a script that logs into a list of several servers 50+ and changes my password all at once. Every 60 days we are required to login to each system and change our passwords or else they expire and our login account is deleted. I have an idea on how I could do this but... (4 Replies)
Discussion started by: darthur
4 Replies

2. UNIX for Dummies Questions & Answers

change user through shell script

hi, my problem is that i am calling a script from my perl program. the script checks wether a particular process is running or not if the process is not running then it should start the process. the problem here is that the front end logs into backend with a user which does not have the... (0 Replies)
Discussion started by: raviraushanjha
0 Replies

3. Shell Programming and Scripting

How do i change to super user then revert back to ordinary user ,using shell script?

Hi all, I am trying to eject the cdrom from a livecd after certain stage... Now assuming that it is possible to eject,please consider my issue!!! The OS boots into a regular user by default...so i am unable to use the eject command to push out the drive... However if i try pfexec eject it... (3 Replies)
Discussion started by: wrapster
3 Replies

4. Shell Programming and Scripting

Change user on remote machine and execute script!

Hi, I need to login into remote server and execute a shell script over there. As of now i am making use of ssh command ssh primUser@135.254.242.2 sh /poll.sh I am logging in as primUser but unless i change the user to root the script execution on the remote machine is not possible. ... (5 Replies)
Discussion started by: goutham4u
5 Replies

5. Shell Programming and Scripting

script to change passwords for the same user on multiple servers

I am trying to write a script to change passwords for the same user on multiple servers. My environment runs purely ssh / scp not rsh / rcp and therefore coping using rcp is not an option. I have been playing with expect to perform tasks but think there must be a better way. Has anyone got... (7 Replies)
Discussion started by: stolz
7 Replies

6. Shell Programming and Scripting

Change to user root without end the script

Hello there! I need help: I have this script: #!/bin/bash #chage to root user sudo su #Insert actual date echo -n "Ingrese fecha actual: " #Read the actual date read fecha #clean RAM memory sync ; echo 3 > /proc/sys/vm/drop_caches ; swapoff -a && swapon -a #backup opennms... (2 Replies)
Discussion started by: bobbasystem
2 Replies

7. Shell Programming and Scripting

Shell Script to change a user password using script

Hi Experts, I had tried to executes this script to change the user password through script: No lines in buffer #!/bin/ksh cat /etc/passwd | grep -v userid >> /tmp/pass.tmp1 cat /etc/passwd | grep userid >> /tmp/pass.tmp2 PASS1=`cat /tmp/pass.tmp2 | cut -d ":" -f2` PASS2=`q2w3e4r5` sed... (3 Replies)
Discussion started by: indrajit_renu
3 Replies

8. UNIX for Dummies Questions & Answers

Change user passwords using shell script

Hi, I want to change the password of unix users on a number of servers.My plan was to ssh to all the servers in a shell script and use the passwd command. I tried to do so but everytime i run it i get this error. ssh -x -n -l user1 host passwd Changing password for "user1" 3004-709 Error... (3 Replies)
Discussion started by: poojabhat
3 Replies

9. Linux

script for password change for exiting user

Dear Forum, In our organization 100 user is existing. Now i want to change password for 100 user in linux server. Pls help to write script for changing password. Regads// Taifur (3 Replies)
Discussion started by: taifurakhand
3 Replies
script(5)							       Files								 script(5)

NAME
script - Boot script DESCRIPTION
The boot script describes how the Erlang runtime system is started. It contains instructions on which code to load and which processes and applications to start. The command erl -boot Name starts the system with a boot file called Name.boot , which is generated from the Name.script file, using sys- tools:script2boot/1 . The .script file is generated by systools from a .rel file and .app files. FILE SYNTAX
The boot script is stored in a file with the extension .script The file has the following syntax: {script, {Name, Vsn}, [ {progress, loading}, {preLoaded, [Mod1, Mod2, ...]}, {path, [Dir1,"$ROOT/Dir",...]}. {primLoad, [Mod1, Mod2, ...]}, ... {kernel_load_completed}, {progress, loaded}, {kernelProcess, Name, {Mod, Func, Args}}, ... {apply, {Mod, Func, Args}}, ... {progress, started}]}. * Name = string() defines the name of the system. * Vsn = string() defines the version of the system. * {progress, Term} sets the "progress" of the initialization program. The function init:get_status() returns the current value of the progress, which is {InternalStatus,Term} . * {path, [Dir]} where Dir is a string. This argument sets the load path of the system to [Dir] . The load path used to load modules is obtained from the initial load path, which is given in the script file, together with any path flags which were supplied in the command line arguments. The command line arguments modify the path as follows: * -pa Dir1 Dir2 ... DirN adds the directories Dir1, Dir2, ..., DirN to the front of the initial load path. * -pz Dir1 Dir2 ... DirN adds the directories Dir1, Dir2, ..., DirN to the end of the initial load path. * -path Dir1 Dir2 ... DirN defines a set of directories Dir1, Dir2, ..., DirN which replaces the search path given in the script file. Directory names in the path are interpreted as follows: * Directory names starting with / are assumed to be absolute path names. * Directory names not starting with / are assumed to be relative the current working directory. * The special $ROOT variable can only be used in the script, not as a command line argument. The given directory is relative the Erlang installation directory. * {primLoad, [Mod]} loads the modules [Mod] from the directories specified in Path . The script interpreter fetches the appropriate mod- ule by calling the function erl_prim_loader:get_file(Mod) . A fatal error which terminates the system will occur if the module cannot be located. * {kernel_load_completed} indicates that all modules which must be loaded before any processes are started are loaded. In interactive mode, all {primLoad,[Mod]} commands interpreted after this command are ignored, and these modules are loaded on demand. In embedded mode, kernel_load_completed is ignored, and all modules are loaded during system start. * {kernelProcess, Name, {Mod, Func, Args}} starts a "kernel process". The kernel process Name is started by evaluating apply(Mod, Func, Args) which is expected to return {ok, Pid} or ignore . The init process monitors the behaviour of Pid and terminates the system if Pid dies. Kernel processes are key components of the runtime system. Users do not normally add new kernel processes. * {apply, {Mod, Func, Args}} . The init process simply evaluates apply(Mod, Func, Args) . The system terminates if this results in an error. The boot procedure hangs if this function never returns. Note: In the interactive system the code loader provides demand driven code loading, but in the embedded system the code loader loads all the code immediately. The same version of code is used in both cases. The code server calls init:get_argument(mode) to find out if it should run in demand mode, or non-demand driven mode. SEE ALSO
systools(3erl) Ericsson AB sasl 2.1.9.3 script(5)
All times are GMT -4. The time now is 08:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy