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
nisserver(1M)                                             System Administration Commands                                             nisserver(1M)

NAME
nisserver - set up NIS+ servers SYNOPSIS
/usr/lib/nis/nisserver -r [-x] [-f] [-v] [-Y] [ -d NIS+_domain] [ -g NIS+_groupname] [-l network_passwd] /usr/lib/nis/nisserver -M [-x] [-f] [-v] [-Y] -d NIS+_domain [ -g NIS+_groupname] [ -h NIS+_server_host] /usr/lib/nis/nisserver -R [-x] [-f] [-v] [-Y] [ -d NIS+_domain] [ -h NIS+_server_host] DESCRIPTION
The nisserver shell script can be used to set up a root master, non-root master, and replica NIS+ server with level 2 security (DES). If other authentication mechanisms are configured with nisauthconf(1M), nisserver will set up a NIS+ server using those mechanisms. nisauth- conf(1M) should be used before nisserver. When setting up a new domain, this script creates the NIS+ directories (including groups_dir and org_dir) and system table objects for the domain specified. It does not populate the tables. nispopulate(1M) must be used to populate the tables. OPTIONS
-d NIS+_domain Specifies the name for the NIS+ domain. The default is your local domain. -f Forces the NIS+ server setup without prompting for confirmation. -g NIS+_groupname Specifies the NIS+ group name for the new domain. This option is not valid with -R option. The default group is admin.<domain>. -h NIS+_server_host Specifies the hostname for the NIS+ server. It must be a valid host in the local domain. Use a fully qualified hostname (for example, hostx.xyz.sun.com.) to specify a host outside of your local domain. This option is only used for setting up non-root master or replica servers. The default for non-root master server setup is to use the same list of servers as the parent domain. The default for replica server setup is the local hostname. -l network_password Specifies the network password with which to create the credentials for the root master server. This option is only used for master root server setup (-r option). If this option is not specified, the script prompts you for the login password. -M Sets up the specified host as a master server. Make sure that rpc.nisd(1M) is running on the new master server before this command is executed. -R Sets up the specified host as a replica server. Make sure that rpc.nisd is running on the new replica server. -r Sets up the server as a root master server. Use the -R option to set up a root replica server. -v Runs the script in verbose mode. -x Turns the echo mode on. The script just prints the commands that it would have executed. Note that the commands are not actually executed. The default is off. -Y Sets up a NIS+ server with NIS-compatibility mode. The default is to set up the server without NIS-compatibility mode. USAGE
Use the first synopsis of the command (-r) to set up a root master server. To run the command, you must be logged in as super-user on the server machine. Use the second synopsis of the command (-M) to set up a non-root master server for the specified domain. To run the command, you must be logged in as a NIS+ principal on a NIS+ machine and have write permission to the parent directory of the domain that you are setting up. The new non-root master server machine must already be an NIS+ client (see nisclient(1M)) and have the rpc.nisd(1M) daemon running. Use the third synopsis of the command (-R) to set up a replica server for both root and non-root domains. To run the command, you must be logged in as a NIS+ principal on a NIS+ machine and have write permission to the parent directory of the domain that you are replicating. The new non-root replica server machine must already be an NIS+ client and have the rpc.nisd daemon running. EXAMPLES
Example 1: Setting up Servers To set up a root master server for domain sun.com.: root_server# /usr/lib/nis/nisserver -r -d sun.com. For the following examples make sure that the new servers are NIS+ clients and that rpc.nisd is running on these hosts before executing nisserver. To set up a replica server for the sun.com. domain on host sunreplica: root_server# /usr/lib/nis/nisserver -R -d sun.com. -h sunrep To set up a non-root master server for domain xyz.sun.com. on host sunxyz with the NIS+ groupname as admin-mgr.xyz.sun.com.: root_server# /usr/lib/nis/nisserver -M -d xyz.sun.com. -h sunxyz -g admin-mgr.xyz.sun.com. To set up a non-root replica server for domain xyz.sun.com. on host sunabc: sunxyz# /usr/lib/nis/nisserver -R -d xyz.sun.com. -h sunabc ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
nis+(1), nisgrpadm(1), nismkdir(1), nisaddcred(1M), nisauthconf(1M), nisclient(1M), nisinit(1M), nispopulate(1M), nisprefadm(1M), nis- setup(1M), rpc.nisd(1M), attributes(5) NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.10 13 Dec 2001 nisserver(1M)