Changing Password in NIS


 
Thread Tools Search this Thread
Operating Systems Solaris Changing Password in NIS
# 8  
Old 11-14-2008
Jlliagre,

I have updated the script to my needs. Can you please let me know whether i am right or wrong.

Note - My Home directories are in /users mountpoint.

I am writing an executable sheel script called /etc/auto_home_create

#!/bin/ksh -p
#
# Find home directory; create directories under /users
#

hdir=$(echo ~$1)

if [[ "$hdir" != /users/* ]]
then
# Not a user with a valid home directory.
mkdir /users/$1 #(/users is a world writeable dir)
fi
exit

Would this script solve my need? Pardon my ignorance,if this is wrong.

Thanks
HG
efunds
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing Passwd on Many servers that is not NIS

Hi Expert, I have environment where password is locally managed, not NIS, not LDAP, not Centrally managed. In order to access to this environment I have to use Jump Box, and only from jumpbox I can login to every host. I can't login direct from inside one host within that environment to... (1 Reply)
Discussion started by: regmaster
1 Replies

2. Red Hat

NIS password policy

Hi, I am running NIS server on redhat linux 5 and I want to implement password restrictions for the yppasswd, how can I do it.Please help me. I can implement password restriction for passwd by configuring /etc/pam.d/system-auth and setting crack_lib.so but I don't know how to implent the same... (3 Replies)
Discussion started by: ktrimu
3 Replies

3. Solaris

NIS - Change Password @ first login.

Hi Any body knows how to prompt user to change password on first login in a Solaris NIS client. Thanks HG (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies

4. Solaris

NIS Password

Greetings All, I am newbie to Unix. Have the following issue: Users are unable to change their password themselves. After they ash to a specific box (NIS Account is extended to that box)and then su as them with an assigned password and run command to change the password they get this error: ... (2 Replies)
Discussion started by: cardiner
2 Replies

5. Red Hat

Password Ageing NIS

I have a RHEL 5 NIS server. It seems to be working fine except for password ageing. If passwords expire in the shadow file then users are still able to log on with no problems and no notifications. Does anyone know how to turn password ageing on through NIS? (4 Replies)
Discussion started by: darren.wyatt
4 Replies

6. Solaris

NIS password file update issue

Hi Our nis server running on Sun solaris 8 operating system. I have added a new user in the nis passwd file & when I am trying to update the file from nis server by using following command: # cd /var/yp # make updated passwd It updates the passwd file but does not come back to command... (3 Replies)
Discussion started by: dolphin
3 Replies

7. Shell Programming and Scripting

is there anyway of implementing password aging in NIS?

Hi , is there anyway of implementing password aging in NIS? I would say thanks in advance. Thanks and regards, HAA (1 Reply)
Discussion started by: HAA
1 Replies

8. Solaris

problem in changing the NIS passwd

Now I face a problem in changing the NIS passwd,I have no idea,want you to help me! Today I add some user in the NIS master server ,I "vi" /etc/passwd &/etc/shadow,add user account and password by hand(shadow----no password ,only eight ":"). when finsh,I login ,system told me to input a password... (3 Replies)
Discussion started by: dlsjm
3 Replies

9. Solaris

Problem in changing password in NIS

Hi, I need help urgently. I've been running NIS for 4 years without problem. And just two weeks ago, all my users are unable to change their password which never happens before. When we issue passwd or yppasswd, this is what we get passwd : Changing password for Jennifer Enter existing... (2 Replies)
Discussion started by: jennifer
2 Replies

10. UNIX for Dummies Questions & Answers

Password Changing With NIS

SCO OpenServer 5.05 Has anyone ever received this error when attempting to change/assign a user password? #ypasswd ======================================= yppasswd: (host name) is not running yppasswd daemon Password request denied. Reason: Remote password change request denied.... (2 Replies)
Discussion started by: gseyforth
2 Replies
Login or Register to Ask a Question
yppasswd(1)							   User Commands						       yppasswd(1)

NAME
yppasswd - change your network password in the NIS database SYNOPSIS
yppasswd [username] DESCRIPTION
The yppasswd utility changes the network password associated with the user username in the Network Information Service (NIS) database. If the user has done a keylogin(1), and a publickey/secretkey pair exists for the user in the NIS publickey.byname map, yppasswd also re- encrypts the secretkey with the new password. The NIS password may be different from the local one on your own machine. yppasswd prompts for the old NIS password, and then for the new one. You must type in the old password correctly for the change to take effect. The new password must be typed twice, to forestall mistakes. New passwords must be at least four characters long, if they use a sufficiently rich alphabet, and at least six characters long if mono- case. These rules are relaxed if you are insistent enough. Only the owner of the name or the super-user may change a password; superuser on the root master will not be prompted for the old password, and does not need to follow password construction requirements. The NIS password daemon, rpc.yppasswdd must be running on your NIS server in order for the new password to take effect. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ SEE ALSO
keylogin(1), login(1), NIS+(1), nispasswd(1), passwd(1), getpwnam(3C), getspnam(3C), secure_rpc(3NSL), nsswitch.conf(4), attributes(5) WARNINGS
Even after the user has successfully changed his or her password using this command, the subsequent login(1) using the new password will be successful only if the user's password and shadow information is obtained from NIS. See getpwnam(3C), getspnam(3C), and nsswitch.conf(4). NOTES
The use of yppasswd is discouraged, as it is now only a wrapper around the passwd(1) command, which should be used instead. Using passwd(1) with the -r nis option (see NIS+(1)) will achieve the same results, and will be consistent across all the different name services avail- able. BUGS
The update protocol passes all the information to the server in one RPC call, without ever looking at it. Thus, if you type your old pass- word incorrectly, you will not be notified until after you have entered your new password. SunOS 5.11 28 Nov 2001 yppasswd(1)