Sponsored Content
Full Discussion: Script for another user
Top Forums Shell Programming and Scripting Script for another user Post 302831859 by Skrynesaver on Friday 12th of July 2013 05:10:00 AM
Old 07-12-2013
You could add debmed to the staff group in order that they could read the directory
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Running script from other user rather than login user

Hi, My requirement is that i am login from ROOT in a script but when any command is coming which is logging to sqlplus then i have to run it with normal user as only normal user have permission to connect to sqlplus . i tried making a script like this : #! /bin/ksh su -... (3 Replies)
Discussion started by: rawatds
3 Replies

3. 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

4. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies

5. UNIX for Advanced & Expert Users

Determining if user is local-user in /etc/passwd or LDAP user

Besides doing some shell-script which loops through /etc/passwd, I was wondering if there was some command that would tell me, like an enhanced version of getent. The Operating system is Solaris 10 (recent-ish revision) using Sun DS for LDAP. (5 Replies)
Discussion started by: ckmehta
5 Replies

6. 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

7. Shell Programming and Scripting

How to Login as another user through Shell script from current user[Not Root]

Hi Every body, I would need a shell script program to login as different user and perform some copy commands in the script. example: Supppose ora_toms is the active user ora_toms should be able to run a script where user: ftptomsp pass: XXX should login through and run the commands ... (9 Replies)
Discussion started by: ujjwal27
9 Replies

8. Shell Programming and Scripting

Login into another user from user inside script

now i have logged in username : ramesh in unix Now i have to created script file to login into another user and have run a command inside that user and after executing the command i have to exit from that user. Inside script, i have to login into su - ram along with password : haihow and have to... (4 Replies)
Discussion started by: rammm
4 Replies

9. Shell Programming and Scripting

Script interacts with user , based on user input it operates

i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled. #!/bin/sh echo " Enter your choice to continue y/Y OR n/N to quit " read A if then echo " user requested to continue " ##some commands... (7 Replies)
Discussion started by: only4satish
7 Replies

10. Shell Programming and Scripting

How to Switch from Local user to root user from a shell script?

Hi, I need to switch from local user to root user in a shell script. I need to make it automated so that it doesn't prompt for the root password. I heard the su command will do that work but it prompt for the password. and also can someone tell me whether su command spawns a new shell or... (1 Reply)
Discussion started by: Little
1 Replies
ST_SNAPSHOT(1)							      systraq							    ST_SNAPSHOT(1)

NAME
st_snapshot - calculate checksum and stat ownership and permissions of files SYNOPSIS
ST_SUM=sha256sum st_snapshot patterns homepatterns DESCRIPTION
st_snapshot calculates checksums and stats ownership and permissions of critical system files. This script is typically run in either root-mode or public-mode. Running this script in root-mode requires root priviliges. One is adviced to set up a dedicated user account for running this script in public mode. In root-mode, the files snapshot_root.list and snapshot_root.homelist are typically passed as arguments. These pattern files are read by the script and contain names of files and directories; listing a directory in such a pattern file is equivalent to listing all files which live in the directorytree with this directory as root. snapshot_root.list could e.g. read # snapshot_root.list - files and directories we wanna get # monitored: we wanna get a note once these files, or any file # under these directories, gets created, gets rm-ed, gets # permissions or contents changed. these notices will not # include the possibly secret contents of these files # # this file gets read by st_systraq /etc/group /etc/gshadow /etc/hosts.allow /etc/hosts.deny /etc/hosts.equiv /etc/lilo.conf /etc/passwd /etc/postfix/server.pem /etc/shadow /etc/skel /etc/ssh Equivalent files snapshot_pub.list and snapshot_pub.homelist should be on the system. These files should contain all worldreadable to be monitored files. This allows for running this script as root only in those cases where it's needed: when reading files, readable for root only. The homelist files contain files and directories which should get monitored for every homedirectory on the system. snapshot_pub.homelist could e.g. contain: .profile .cshrc .tcshrc .login .logout .bash_profile .bashrc .exrc .nexrc As a special case, when the environment variable ST_OPHOMES is set to a non-empty string (typically when running in public mode), we stat the permissions on all homedirectories themselves. The produced snapshot is printed to stdout. The output when running in public mode could look like: # ownership and permissions of homedirs drwxr-xr-x root root /bin drwxr-xr-x root root /dev drwxr-sr-x root staff /home drwxr-sr-x joostvb joostvb /home/joostvb drwxr-xr-x root root /usr/sbin drwxr-xr-x root root /var # sha256sum of critical pub files 4d3cd13d6dbc10e2e3ccb9477cbc9eb9b76302454c276d5771ae0b10a5fbb4d2 /home/joostvb/.ssh/id_rsa.pub eb8d83e0246f761a21bdfb13a03fac634ed7c3b7dde4c2efddd7b2838d32596f /var/qmail/alias/.bashrc 4e371f9a11f5a2464d3d5c952e58e24f73b377d33767ed93b2082fcb59a647fe /etc/zlogin # ownership and permissions of critical pub files -rw-rw-r-- joostvb joostvb /home/joostvb/.ssh/id_rsa.pub -rw-r--r-- joostvb joostvb /home/joostvb/.ssh/authorized_keys ENVIRONMENT
ST_OPHOMES - non-empty in case permissions on all homedirectories should be printed ST_SUM - command for calculating file checksums. E.g. sha256sum, sha512sum, sha384sum, sha224sum or sha1sum. SEE ALSO
The systraq manual. VERSION
This manpage: $Id: st_snapshot.pod 374 2008-12-14 08:47:32Z joostvb $ COPYRIGHT
Copyright (C) 2001, 2002, 2003, 2004, 2008 Joost van Baal This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html or write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. AUTHOR
Joost van Baal <joostvb-systraq-20041015@mdcc.cx> 20081217 2008-12-15 ST_SNAPSHOT(1)
All times are GMT -4. The time now is 07:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy