LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Reply
 
Search this Thread
Old 04-29-2010, 06:57 AM   #1
prpednek
LQ Newbie
 
Registered: Mar 2010
Location: India
Distribution: RHEL
Posts: 22

Rep: Reputation: 16
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.
 
Old 04-29-2010, 07:49 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by prpednek View Post
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
 
Old 04-29-2010, 11:42 AM   #3
prpednek
LQ Newbie
 
Registered: Mar 2010
Location: India
Distribution: RHEL
Posts: 22

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by centosboy View Post
There is an example here...at the bottom of page

http://www.redhat.com/docs/manuals/l...stinstall.html
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.
 
Old 05-04-2010, 08:10 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by prpednek View Post
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
 
Old 05-07-2010, 03:51 AM   #5
prpednek
LQ Newbie
 
Registered: Mar 2010
Location: India
Distribution: RHEL
Posts: 22

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by centosboy View Post
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!!!
 
Old 06-23-2014, 07:03 AM   #6
suraj.sm11
LQ Newbie
 
Registered: Jun 2014
Posts: 1

Rep: Reputation: Disabled
creating a user in %post script

hi i have just configured a linux trough kickstart scrip i need to write a scrip in %post instaliton to create a user can any one help me by posting the script

---------- Post added 06-23-14 at 05:34 PM ----------

hi i have just configured a linux trough kickstart scrip i need to write a scrip in %post instaliton to create a user can any one help me by posting the script
 
  


Reply

Tags
encrypt, kickstart, password, post, rhel5, user


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create user add file with default password and force user to change it? Morgandy Linux - Newbie 3 02-02-2010 05:06 PM
Kickstart Error Error opening kickstart file (null): bad address Latitude Linux - Networking 0 06-03-2009 11:20 AM
how to add users to kickstart config file? windstory Linux - Newbie 4 02-26-2009 02:35 AM
ES4 Kickstart - Trying to add new modules ImDaDrumma Linux - General 0 07-06-2007 03:03 PM
Samba: how to create a logon script file when i add a system user. heero82 Linux - Software 2 06-19-2003 08:29 PM


All times are GMT -5. The time now is 02:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration