Results 1 to 9 of 9
Hi,
Can anyone help with how to use 'useradd -P' option. Its caps P so it does not mean password. The option describes that the useradd command will look for ...
- 07-10-2007 #1Just Joined!
- Join Date
- Jul 2007
- Posts
- 4
useradd option help.
Hi,
Can anyone help with how to use 'useradd -P' option. Its caps P so it does not mean password. The option describes that the useradd command will look for passwd, shadow and group files in my specified path instead of the usual '/etc'. This works and the userid is created fine. Login procedure now does not know that it has to look for the userid and passwd in this new path so it says user does not exist.
Thanks in advance,
Bharat Devdas.
- 07-10-2007 #2
I've never seen the -P (caps ) in the useradd, probably you command is creating a user called -P without password ,home directory,and login shell !
Regards.Linux is not only an operating system, it's a philosophy.
Archost.
- 07-10-2007 #3
For a more in depth explanation on useradd, type this in the CLI:
Code:man useradd
I praise Webmin and PuTTy!
Registered Linux User: 439431
- 07-10-2007 #4
My question is why would you want to do this?
- 07-11-2007 #5Just Joined!
- Join Date
- Jul 2007
- Posts
- 4
A very good question. Why would I want to do that?
I didn't know about this option myself. My task right now is to Linux Farm. A collection of servers with different architectures and flavors of Linux. I will be creating a userid for each of my team members. This userid must be common across the farm machines along with its password. I.e., if the userid is created in the main server of the farm, it should also be reflected in the other farm servers. If the user decides to change his password, he should change it on this main server and the changed password should be automatically reflected in the other farm servers. How to achieve this?
Copy the user entries from '/etc/passwd', '/etc/shadow' and '/etc/group' from the main server to all the farm machines at regular intervals. Cool!
It is difficult to select perticular entries and copy it to the other machines without having duplicate entries. So was planning to write a script which logs into all the farm machines from the main server and copies the above files to each of the farm machines using 'scp'. Now we really can't copy the entire file also as each Linux flavor has its own users and groups created which most of the times do not match. So if there could be some other way.........
That is when I stumbled across this option. My idea was to create a different 'passwd', 'shadow' and 'group' files which has entries of only my team members. The above mentioned script can run at regular intervals to copy these files to all the machines without affecting the existing files contents.
This was my idea of setting it up. If this is not possible, I'd like help with how to achieve this in a different way.
Thanks,
Bharat Devdas.
- 07-11-2007 #6
Sounds like you need a password server. What you describe might work but it would be a ***** to maintain. Might be easiest to do under samba.
- 07-11-2007 #7Just Joined!
- Join Date
- Jul 2007
- Posts
- 4
I don't understand how I could use samba for this. Could you please help. I could use NIS login but my company policy restricts us from using that.
- 07-11-2007 #8
Make it a domain server.
Then point the log on process to that server to get the log on credentials.
- 07-12-2007 #9Just Joined!
- Join Date
- Jul 2007
- Posts
- 4
When I said NIS, that is what I meant. Domain servers cannot be used inside our intra net.


Reply With Quote