%post in ubuntu kickstart

Rohit Kumar Mehta rohitm at engr.uconn.edu
Wed Mar 25 16:13:52 GMT 2009

Sorry Stephen, I'm not sure why it fails either. 
I would only try the very obvious things (make sure you have the 
absolute path to useradd, etc). You could also try your command "useradd 
... >/var/log/useraddlog" and maybe that would provide some more 
information.  I'm pretty sure a one-time python script would work.


stephen mulcahy wrote:
> Rohit Kumar Mehta wrote:
>> However my post "%post --interpreter=/bin/bash" does run inside the 
>> /target.  I found some things difficult to do through the bash script, 
>> so one of the actions in the post was to cd to /etc/rc2.d and download a 
>> perl script with wget and chmod +x it.  The perl script is my real 
>> finish script.  It runs upon first boot, and then deletes itself.  I 
>> like the solution very much.
> Thanks Rohit.
> Looking further, my %post also seems to run inside /target
> My confusion stems from the following part of my %post script failing
> useradd -p '$6$oTSZNL/kPAlPKB11o71HZiN/NMkRkBYRImy0' -m a_user -s 
> /bin/bash -G admin
> I'm trying to add a second user (including a hashed password) - but it 
> silently fails (nothing in /var/log/syslog). If I run this from the 
> kickseed console before rebooting it runs fine so I'm unclear as to why 
> it is failing. Any ideas?
> The perl/python script idea has appeal if only to get around stuff like 
> the above.
> -stephen

Rohit Mehta
Computer Engineer
University of Connecticut
Engineering Computing Services
371 Fairfield Road Unit 2031
Storrs, CT 06269-2031

Office: (860) 486 - 2331
Fax: (860) 486 - 1273

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-installer/attachments/20090325/48f0bcb6/attachment.htm 

More information about the Ubuntu-installer mailing list