04-18-2007
If you absolutely must do this thing using PASSWD, then there is no way around using expect. Programs like su won't allow you to supply the password with something as simple as input redirection.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Here is my situation. On a RedHat 7.3 box, I have a user named jody.
When I log in with jody and type in "id", I get the expected output:
uid=1(jody) gid=1(jody) groups=1(jody), 510(test)
However, I cannot figure which "id" option allows me to change the effective gid. I tried the options... (2 Replies)
Discussion started by: Jody
2 Replies
2. UNIX for Advanced & Expert Users
Hi everyone,
Need help with an issue. The group ownership of files on my Solaris system is getting changed automatically. Could someone tell me the reason why? And how could I correct it? One more info- everytime the ownership changes, it changes to "x".
Thanks :confused: (1 Reply)
Discussion started by: top_gun
1 Replies
3. Filesystems, Disks and Memory
My current GID are all < 100, however I am having issues now with this. Does anyone know of a way to change all GID's to perhaps add 100, IE so GID now = 23 will = 123. I am running an NIS network so changing the table is easy , however finding all the files on all my filesystems and modifying... (4 Replies)
Discussion started by: frankkahle
4 Replies
4. Solaris
Does any one know if changing root's group from “other” to “root” will cause any problems on a running system.
Thanks (4 Replies)
Discussion started by: mjkroner
4 Replies
5. UNIX for Dummies Questions & Answers
i am able to change the mode using chmod and able to change permission.
but i am not able to change group and ownership. getting as invalid
can any one help me regarding this . (4 Replies)
Discussion started by: satheeshkr_cse
4 Replies
6. UNIX for Dummies Questions & Answers
Hi there,
One can easily retrieve the uid from a username :
id -u $username
But how can we easily retrieve the gid from a group name?
I mean is there a command without using sed?
sed -nr "s/^$groupname:x:(+):.*/\1/p" /etc/group
Thanks for your help
Santiago (7 Replies)
Discussion started by: chebarbudo
7 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have a small problem and would be happy if someone could help me to find a solution:
A machine ("server") makes backups of different computers ("clients") using rsync. Users and groups are keept, so that it's possible to copy them back to the client if required. The number of groups... (3 Replies)
Discussion started by: tracer
3 Replies
8. Shell Programming and Scripting
Hi,
I am new to scrippting need little help, I would like to change uid, gid of exisisting user,
example
User A current uid=1,gid=2 would like to change uid=4,gid=5
I know the command to change uid,gid but after changing I have to change permissions on folders also which are belonging... (3 Replies)
Discussion started by: manoj.solaris
3 Replies
9. Shell Programming and Scripting
Hi scripting guru's
I found this script on IBM's website and it seems to be really good only thing it gives off more info than i need. I was wondering if someone could help me modify it to only find a group instead of every user. (group is support)
I believe i know how to add the line so it... (2 Replies)
Discussion started by: vpundit
2 Replies
10. Red Hat
I found that I cannot chgrp for some reason with error:
chgrp: changing group of `<file>': Invalid argument
This happens on all NFS mounted disks on client machines.
We use AD (not my call) for authentication and it also provides groups.
We have a NFS server running Scientific Linux 6.3... (1 Reply)
Discussion started by: venmx
1 Replies
LEARN ABOUT MOJAVE
dsmemberutil
dsmemberutil(1) BSD General Commands Manual dsmemberutil(1)
NAME
dsmemberutil -- various operations for the membership APIs, including state dump, check memberships, UUIDs, etc.
SYNOPSIS
dsmemberutil [-v] [-h] command [options]
DESCRIPTION
dsmemberutil is a program that implements the membership API calls in a command line utility.
FLAGS
A list of flags and their descriptions:
-h Lists the options for calling dsmemberutil
-v Causes dsmemberutil to operate in verbose mode.
COMMANDS
The action of each command is described below:
getuuid -ugUGsS value
Takes any of the options and returns the associated UUID.
getid -UGsSX value
Takes any of the options and returns the associated UID or GID depending on option provided.
getsid -ugUGX value
Takes any of the options and returns the associated SID.
checkmembership -uUxs param -gGXS param
Returns if a user or group with the associated option is a member of the group.
flushcache Flushes the current membership cache.
Legacy commands such as dumpstate and statistics are gone. See odutil(1) for show cache and statistics operations.
A list of options available. In some cases -xX and -sS can be used synonymously due to nature of the value.
-u uid Using user with UID
-U name Using user with name
-s sid Using user with SID
-x uuid Using user with UUID
-g gid Using group with GID
-G name Using group with name
-S sid Using group with SID
-X uuid Using group with UUID
EXAMPLES
Get a user's uuid:
% dsmemberutil getuuid -u 501
EEA4F2F6-B268-49E7-9C6F-E3C4A37DA4FD
Get a group's uuid
% dsmemberutil getuuid -g 0
ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000000
Get a user's or group's id from a uuid
% dsmemberutil getid -X ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C
gid: 12
Check a user's membership in a group (using UID and GID)
% dsmemberutil checkmembership -u 501 -g 0
user is not a member of the group
Check a user's membership in a group (using names)
% dsmemberutil checkmembership -U root -G wheel
user is a member of the group
SEE ALSO
odutil(1), dseditgroup(1), dscacheutil(1)
Darwin Jan 1, 2007 Darwin