LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 02-24-2009, 02:52 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 443

Rep: Reputation: 31
how to add users to kickstart config file?


How to add users to kickstart config file?

I made kickstart config file for easily reinstall centos for recovering from several disasters.
I want to make kickstart config file to include these things.

1. add user
2. add group
3. start sshd

Please let me know how can I add these things to kickstart config file.

This is my kickstart config file.

Quote:
# Kickstart file automatically generated by anaconda.

install
cdrom
lang ko_KR.UTF-8
keyboard us
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$Hnj7fusa$mvtJrwA7q2CVnb2WUYpL2/
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc Asia/Seoul
bootloader --location=mbr --driveorder=hdc --append="rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --linux --drives=hdc
#part /boot --fstype ext3 --size=100 --ondisk=hdc
#part pv.6 --size=0 --grow --ondisk=hdc
#volgroup VolGroup00 --pesize=32768 pv.6
#logvol / --fstype ext3 --name=windstory01 --vgname=VolGroup00 --size=69984
#logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=1000 --grow --maxsize=1984

%packages
@office
@engineering-and-scientific
@development-libs
@editors
@system-tools
@korean-support
@text-internet
@x-software-development
@legacy-network-server
@dns-server
@dialup
@core
@authoring-and-publishing
@base
@network-server
@games
@legacy-software-development
@java
@java-development
@openfabrics-enterprise-distribution
@emacs
@legacy-software-support
@base-x
@graphics
@web-server
@ruby
@smb-server
@printing
@kde-software-development
@kde-desktop
@sound-and-video
@admin-tools
@news-server
@development-tools
@graphical-internet
kdepim
emacs
audit
mesa-libGLU-devel
Deployment_Guide-en-US
kexec-tools
device-mapper-multipath
vnc-server
xorg-x11-server-Xnest
xorg-x11-server-Xvfb
kdegraphics
libsane-hpaio
kdemultimedia
imake
-sysreport
 
Old 02-24-2009, 11:33 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Almost obvious resource ;}

http://www.redhat.com/docs/manuals/l...allconfig.html



Cheers,
Tink
 
Old 02-24-2009, 11:37 PM   #3
sigey
LQ Newbie
 
Registered: Feb 2009
Posts: 13

Rep: Reputation: 1
the '-p' option for useradd along with a hashed password can be used to add multiple user in one go.
A quick man useradd will assist and the above link posted by Tinkster is really useful

thanks
 
Old 02-25-2009, 05:46 AM   #4
bernihard
LQ Newbie
 
Registered: Feb 2009
Location: Spain
Distribution: CentOS 5.2
Posts: 13

Rep: Reputation: 2
At the end of your KS file you can add the following statement:

Code:
%post
/usr/sbin/groupadd foo
/usr/sbin/useradd bar
...
...
so, you can execute commands as it were done into a shell.
 
Old 02-26-2009, 02:35 AM   #5
windstory
Member
 
Registered: Nov 2008
Posts: 443

Original Poster
Rep: Reputation: 31
Tinkster, sigey, bernihard,

Thank you for your kind replies.

I'll try according to your suggestions.
 
  


Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static IP addresses supplied through default kickstart config file? stuart_cherrington Red Hat 5 10-29-2009 12:39 PM
RHEL5 kickstart config file creation problem rado_dimitrov Linux - Enterprise 2 02-13-2008 09:50 AM
add content to .config file wahaha Linux - Wireless Networking 1 08-27-2006 10:14 AM
add a new section to your X config file dalan Linux - General 5 07-27-2006 07:15 PM
MBR location specified in kickstart config file owenh Linux - General 2 03-22-2005 05:06 PM


All times are GMT -5. The time now is 02:54 PM.

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