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
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
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
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
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
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
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
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
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
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
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
chgrp(1) General Commands Manual chgrp(1)
NAME
chgrp - Changes the group ownership of a file or directory
SYNOPSIS
chgrp [-fhR] group file
The chgrp command changes the group associated with the specified file or directory to group.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
chgrp: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
[Tru64 UNIX] Suppresses all error reporting. [Tru64 UNIX] If file is a symbolic link, the command chgrp -h file changes the group of the
symbolic link. The command chgrp file changes the group of the file referenced by the symbolic link. Causes chgrp to descend recursively
through its directory arguments, setting the specified group ID.
OPERANDS
A group name from the group database or a numeric group ID. Either specifies a group ID to be given to each file named by one of the file
operands. If a numeric group operand exists in the group database as a group name, the group ID number associated with that group name is
used as the group ID. A pathname of a file whose group ID is to be modified.
DESCRIPTION
To change the group ID of a file, you must have superuser privilege or your effective user ID must match the owner ID of the file. If you
do not have superuser privilege you can change the group ID of a file only to your effective group ID or to the value of a group of which
you are a member.
The group argument must be either a valid group name that already exists in the group database or a valid group ID.
For each file operand, the chgrp command performs actions equivalent to the chown() function called with the following arguments: The file
operand is used as the path argument. The user ID of the file is used as the owner argument. The specified group ID is used as the group
argument.
Unless the chgrp command is invoked by a process with appropriate privileges, the set-user-ID and set-group-ID bits of a file are cleared
upon successful completion.
NOTES
If the chgrp command is invoked with the -R option and attempts but fails to change the group ID of a particular file in a specified file
hierarchy, it continues to process the remaining files in the hierarchy. If the chgrp command cannot read or search a directory within a
hierarchy, it continues to process the other parts of the hierarchy that are accessible.
EXIT STATUS
The following exit values are returned: Successful completion, all requested changes were made. An error occurred.
EXAMPLES
To change the group ownership of the file or directory named proposals to staff, enter: chgrp staff proposals
The group access permissions for proposals now apply to staff. See chmod for details.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of chgrp: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for-
mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of
LC_MESSAGES.
FILES
Contains group information.
SEE ALSO
Commands: chmod(1), chown(1), groups(1)
Functions: chmod(2), chown(2)
Files: group(4)
Standards: standards(5)
chgrp(1)