Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-29-2010, 06:57 AM
|
#1
|
|
LQ Newbie
Registered: Mar 2010
Location: India
Distribution: RHEL
Posts: 22
Rep:
|
Add new user in kickstart file
Hi,
I am currently trying to add a new user on a linux box in the %post section of the kickstart file.
%post --nochroot --log /root/post-install.log
/usr/sbin/useradd -p <ENCRYPTED_PWD> <USER>
The user however doesn't get created after I reboot the box after install. Am I missing anything ?
Any pointers will be appreciated.
Just for info. I am installing RHEL5.4 on a 64 bit box, I know this should not matter, but what the heck!!
Thanks and Regards,
Prasad Pednekar.
|
|
|
|
04-29-2010, 07:49 AM
|
#2
|
|
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep: 
|
Quote:
Originally Posted by prpednek
Hi,
I am currently trying to add a new user on a linux box in the %post section of the kickstart file.
%post --nochroot --log /root/post-install.log
/usr/sbin/useradd -p <ENCRYPTED_PWD> <USER>
The user however doesn't get created after I reboot the box after install. Am I missing anything ?
Any pointers will be appreciated.
Just for info. I am installing RHEL5.4 on a 64 bit box, I know this should not matter, but what the heck!!
Thanks and Regards,
Prasad Pednekar.
|
There is an example here...at the bottom of page
http://www.redhat.com/docs/manuals/l...stinstall.html
|
|
|
|
04-29-2010, 11:42 AM
|
#3
|
|
LQ Newbie
Registered: Mar 2010
Location: India
Distribution: RHEL
Posts: 22
Original Poster
Rep:
|
Quote:
Originally Posted by centosboy
|
y
Hi Centosboy,
Thanks for the link, btw I tried the example in the link you had suggested, but it seems the user is still not being created. The command I am using in the post section of the kickstart file should also work, as it too takes all the arguments in a single command.
Really racking my brains on this one!!
I think during installation of RHEL as the filesystem is still mounted on '/mnt/sysimage/' it would not allow to create users !!! This is just a guess though!!!
Guyz, please let me know if anyone has sorted or tried out this.
Regards,
Prasad.
|
|
|
|
05-04-2010, 08:10 AM
|
#4
|
|
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep: 
|
Quote:
Originally Posted by prpednek
y
Hi Centosboy,
Thanks for the link, btw I tried the example in the link you had suggested, but it seems the user is still not being created. The command I am using in the post section of the kickstart file should also work, as it too takes all the arguments in a single command.
Really racking my brains on this one!!
I think during installation of RHEL as the filesystem is still mounted on '/mnt/sysimage/' it would not allow to create users !!! This is just a guess though!!!
Guyz, please let me know if anyone has sorted or tried out this.
Regards,
Prasad.
|
whilst i have done most things in the kickstart %post section, i have never tried to add a new user directly unless is was part of a script that is run in the %post section.
I am not likely to test this out in the near future either i am afraid
|
|
|
|
05-07-2010, 03:51 AM
|
#5
|
|
LQ Newbie
Registered: Mar 2010
Location: India
Distribution: RHEL
Posts: 22
Original Poster
Rep:
|
Quote:
Originally Posted by centosboy
whilst i have done most things in the kickstart %post section, i have never tried to add a new user directly unless is was part of a script that is run in the %post section.
I am not likely to test this out in the near future either i am afraid
|
No issues, got it right at the end. The issue was the --nochroot option I was using with the %post section.
Thanks for your help!!! 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:02 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|