Sponsored Content
Full Discussion: Password script sync
Top Forums Shell Programming and Scripting Password script sync Post 302379194 by frank_rizzo on Wednesday 9th of December 2009 10:15:10 PM
Old 12-09-2009
this wont work the way your doing it but here are a few suggestions

1) use sh/ksh/bash for scripting (not really relevant but good practice)
2) If possible don't use NIS - use LDAP and store your passwords in one place then there will be no need for this script.
3) configure SAMBA to authenticate against NIS with a PAM module. again - one password store.
4) just have the user run each command. it should not be that big of a deal as they don't change passwords that often.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

samba questions (password conversion to blowfish and is it wise to sync the useraccou

i stumbled upon something that gave some nice instructions on how to convert FreeBSD passwords from md5 to blowfish. it was simple and straight forward and it worked. i'm running samba on the machine. now i know the tutorial i was following had something where a user's samba and machine... (1 Reply)
Discussion started by: xyyz
1 Replies

2. Solaris

Sync to Green vs. Separate Sync

Hi all....I have a Sun Ultra2 that I want to use with my PC monitor. I have purchased an adapter that does not work and I was told I need to change my video card setting (if I can) to Separate Sync.....my Monitor product number ends in 1343......I am running SunOS 5.7 ......anyone have any ideas? ... (0 Replies)
Discussion started by: psantinello
0 Replies

3. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

4. UNIX for Dummies Questions & Answers

sync password

hi guys I have multiples linux servers Centos 5.3 the idea is to create a mechanism that when users change his password that new password will change on all linux boxes.... do you have any experience on this? I know there are scripts to change password for a user but mine is whenever a... (11 Replies)
Discussion started by: karlochacon
11 Replies

5. Shell Programming and Scripting

Korn shell script to sync/move files that are not in use

Hello all. This may seem like a dumb/easy question but right now I have a little script I made that uses rsync to sync a directory that has files in it that may or may not be complete files. I want to come up with a better solution for this. What it is is I have a directory lets say /incomplete... (4 Replies)
Discussion started by: linuxn00b
4 Replies

6. Shell Programming and Scripting

crontab using shell script to sync files.

Hi, I developed one shell script where it will sync the files using perforce, #!/bin/bash TERM=linux export TERM clear echo "" $PATH echo "" cd /u/userk/p4/p4_client/TES_DATE echo "" echo "Sync p4 " p4 sync echo "Executing for second time " p4 -u userk -p p4net:161 -c... (8 Replies)
Discussion started by: asak
8 Replies

7. Solaris

Sync script between two places

Hello Team, We would like to copy or sync a couple a zpool and all dataset inside between two datacenters one time per day, the structure and space are the same in both sides. We are consider to use rsync and a cron job. We would like to know what type of ports we have to open in the... (1 Reply)
Discussion started by: csierra
1 Replies

8. Shell Programming and Scripting

Make a password protected bash script resist/refuse “bash -x” when the password is given

I want to give my long scripts to customer. The customer must not be able to read the scripts even if he has the password. The following command locks and unlocks the script but the set +x is simply ignored. The code: read -p 'Script: ' S && C=$S.crypt H='eval "$((dd if=$0 bs=1 skip=//|gpg... (7 Replies)
Discussion started by: frad
7 Replies

9. Shell Programming and Scripting

SFTP prompting for password even though password is in script

Hi All, I am trying to transfer a file from one server to a remote server using SFTP. Client is not ready for key setup. I am working on Solaris 10. Here is the code. #!/bin/ksh # sample automatic Sftp script to dump a file USER="user1" PASSWORD="pass1" HOST="host1" sftp $USER@$HOST... (6 Replies)
Discussion started by: megha2525
6 Replies

10. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies
GPASSWD(1)							   User Commands							GPASSWD(1)

NAME
gpasswd - administer /etc/group and /etc/gshadow SYNOPSIS
gpasswd [option] group DESCRIPTION
The gpasswd command is used to administer /etc/group, and /etc/gshadow. Every group can have administrators, members and a password. System administrators can use the -A option to define group administrator(s) and the -M option to define members. They have all rights of group administrators and members. gpasswd called by a group administrator with a group name only prompts for the new password of the group. If a password is set the members can still use newgrp(1) without a password, and non-members must supply the password. Notes about group passwords Group passwords are an inherent security problem since more than one person is permitted to know the password. However, groups are a useful tool for permitting co-operation between different users. OPTIONS
Except for the -A and -M options, the options cannot be combined. The options which apply to the gpasswd command are: -a, --add user Add the user to the named group. -d, --delete user Remove the user from the named group. -h, --help Display help message and exit. -Q, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -r, --remove-password Remove the password from the named group. The group password will be empty. Only group members will be allowed to use newgrp to join the named group. -R, --restrict Restrict the access to the named group. The group password is set to "!". Only group members with a password will be allowed to use newgrp to join the named group. -A, --administrators user,... Set the list of administrative users. -M, --members user,... Set the list of group members. CAVEATS
This tool only operates on the /etc/group and /etc/gshadow files. Thus you cannot change any NIS or LDAP group. This must be performed on the corresponding server. CONFIGURATION
The following configuration variables in /etc/login.defs change the behavior of this tool: ENCRYPT_METHOD (string) This defines the system default encryption algorithm for encrypting passwords (if no algorithm are specified on the command line). It can take one of these values: DES (default), MD5, SHA256, SHA512. Note: this parameter overrides the MD5_CRYPT_ENAB variable. Note: This only affect the generation of group passwords. The generation of user passwords is done by PAM and subject to the PAM configuration. It is recommended to set this variable consistently with the PAM configuration. MAX_MEMBERS_PER_GROUP (number) Maximum members per group entry. When the maximum is reached, a new group entry (line) is started in /etc/group (with the same name, same password, and same GID). The default value is 0, meaning that there are no limits in the number of members in a group. This feature (split group) permits to limit the length of lines in the group file. This is useful to make sure that lines for NIS groups are not larger than 1024 characters. If you need to enforce such limit, you can use 25. Note: split groups may not be supported by all tools (even in the Shadow toolsuite). You should not use this variable unless you really need it. MD5_CRYPT_ENAB (boolean) Indicate if passwords must be encrypted using the MD5-based algorithm. If set to yes, new passwords will be encrypted using the MD5-based algorithm compatible with the one used by recent releases of FreeBSD. It supports passwords of unlimited length and longer salt strings. Set to no if you need to copy encrypted passwords to other systems which don't understand the new algorithm. Default is no. This variable is superseded by the ENCRYPT_METHOD variable or by any command line option used to configure the encryption algorithm. This variable is deprecated. You should use ENCRYPT_METHOD. Note: This only affect the generation of group passwords. The generation of user passwords is done by PAM and subject to the PAM configuration. It is recommended to set this variable consistently with the PAM configuration. SHA_CRYPT_MIN_ROUNDS (number), SHA_CRYPT_MAX_ROUNDS (number) When ENCRYPT_METHOD is set to SHA256 or SHA512, this defines the number of SHA rounds used by the encryption algorithm by default (when the number of rounds is not specified on the command line). With a lot of rounds, it is more difficult to brute forcing the password. But note also that more CPU resources will be needed to authenticate users. If not specified, the libc will choose the default number of rounds (5000). The values must be inside the 1000-999,999,999 range. If only one of the SHA_CRYPT_MIN_ROUNDS or SHA_CRYPT_MAX_ROUNDS values is set, then this value will be used. If SHA_CRYPT_MIN_ROUNDS > SHA_CRYPT_MAX_ROUNDS, the highest value will be used. Note: This only affect the generation of group passwords. The generation of user passwords is done by PAM and subject to the PAM configuration. It is recommended to set this variable consistently with the PAM configuration. FILES
/etc/group Group account information. /etc/gshadow Secure group account information. SEE ALSO
newgrp(1), groupadd(8), groupdel(8), groupmod(8), grpck(8), group(5), gshadow(5). shadow-utils 4.5 01/25/2018 GPASSWD(1)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy