thanks all, the gpasswd command worked perfectly and methyl, thanks, you are right i should run pwck and grpck before hand, however you are wrong about the 'usermod -G' command above as that works perfectly well. I believe -G is for suplimentary groups not primary so all is good. The man page confirms this ...
I'm kinda new to unix programming so bear with me...
I'm running a script prompting a user for an existing user and group and want to be able to validate if they valid.
Is there any code available?
Any help or push in the right direction would help.
Thank you, (2 Replies)
im trying to get an ARP readout using the command 'arp -a'... but the command doesnt exist in Fedora Core 6 - IPv6.... is there an equivalent command? (4 Replies)
Hi,
Another problem, here is my code
#!/bin/sh
dir='/opt/apps/script/CSV'
datadir='/opt/apps/script/data'
while : ; do
ls -1rt $dir/*.csv > /dev/null 2>&1
if ;then
cp $datadir/weekly.txt $dir/weekly.csv
else
exit 0
fi
done (10 Replies)
I tried a few ways to resolve this using a bash script w/ a loop, no luck.
File1: roughly 6,000 account numbers such as:
1111
1512
1113
123
I also have a dozen or so csv files, w/ the account number in the 4th field. What I would like to do is remove all lines if the... (19 Replies)
Hey People,
I've got a question! How can i write a function in a script which is looking for if a group exist and if not, that the group "users" is the standard group..I know that i have to use "grep" und "if-else"..I will be very happy for answers ;)
Greetz
Ali (2 Replies)
I am trying to add some code to the begging of a script so that it will remove all the .transcript files, when their is no coressponding .wav file. But it doesnt work.
This is the code I have added:
for transcriptfile in `$voicemaildir/*.transcript`; do
wavfile=`echo $transcriptfile | cut -d'.'... (2 Replies)
Our SAN administrator decided to unpresent then destroy LUN's we were actively using as a volume group (all PV's in said volume group). Now every time I do a pvscan or whatever it complains about I/O errors trying to access those PV's. How do I get it to forget the VG existed completely? vgreduce... (7 Replies)
Hi,
In the following output you can see the the user "richard" is a member on the team/group "developers":
# id richard
uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers)
but in the following details of the said group (developers), the said user... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I'm able to create a group but when I'm trying to delete the group it keeps stating Group Doesn't Exist. I know... (2 Replies)
Discussion started by: GoBoyGo
2 Replies
LEARN ABOUT OSF1
grpck
pwck(8) System Manager's Manual pwck(8)NAME
pwck, grpck - Checks the password and group files for inconsistencies
SYNOPSIS
pwck [-admNs] [file]
grpck [-mNp] [file]
FLAGS
Causes both pwck and grpck to additionally check the NIS database entries using the same consistency tests. Users that are defined in the
local password or group file without the "+" at the start of the name field are flagged as duplicate entries.
pwck
Inhibits the running of the /tcb/bin/authck -p command on a system running Enhanced Security. Prevents pwck from checking for the presence
of the user's login directory. Directs pwck to check for mixed case usernames. Causes pwck to check for the presence of the optional
shell field for each entry.
grck
If there are no members, causes grpck to display a message indicating the listed group has no members. Directs grpck to not check for a
users' existence in the password database (local or NIS).
DESCRIPTION
The pwck command scans the /etc/passwd file, or the named file, and writes to standard out any inconsistencies. The scan checks the number
of fields, login name, user ID, group ID, and existence of a login directory and optional program name.
The grpck command scans the /etc/group file, or the named file, and writes to standard out any inconsistencies. The scan checks the number
of fields, group name, group ID, and whether all login names appear in the password file.
EXAMPLES
To verify the password information in the /etc/passwd file for consistency, enter: pwck
To verify the password information in the /etc/passwd file and the NIS database for consistency without checking each users login directory
validity, enter: pwck -Nd
To verify the group information in the /etc/group file and the NIS database for consistency, enter: grpck -N
FILES
Specifies the command path Specifies the command path Contains user information Contains group information
RELATED INFORMATION
Commands: adduser(8), authck(8), groups(1), passwd(1), vipw(8)
Files: passwd(4), group(4), ypfiles(4) delim off
pwck(8)