LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-19-2011, 09:54 PM   #1
LQ Newbie
Registered: May 2011
Posts: 14

Rep: Reputation: 1
useradd command to create passwd, shadow & other files under different directory


I am bulding my own image based on 2.6.32 kernel, I wish to add a guest user:

In a script thats invoked by the makefile, I use 'useradd' command & this updates the shadow, passwd files under /etc on the host, is it possible to tell the command to create the shadow / password under some other folder on the host? may be /tmp?

Old 05-20-2011, 01:52 AM   #2
Registered: May 2006
Location: Brisbane, Australia
Posts: 120

Rep: Reputation: 32
Typical method is to chroot to the top of the root filesystem you are building and then use the command as normal.
1 members found this post helpful.
Old 05-20-2011, 08:26 AM   #3
LQ Newbie
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: 1
Thank you very much!


passwd, shadow, useradd

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/passwd & /etc/shadow a7mlinux Linux - General 2 08-02-2009 01:19 PM
create a user who can also run useradd and passwd only kkeith Linux - Newbie 5 06-29-2006 07:43 AM
/etc/passwd & /etc/shadow through php? whysyn Linux - Software 4 11-29-2005 11:29 PM
usermod, beyond passwd & shadow Hans Zilles Linux - General 0 11-26-2005 06:29 PM
Remove? /etc/shadow- & /etc/passwd- lcat Linux - Security 2 08-22-2004 11:26 AM

All times are GMT -5. The time now is 03:18 AM.

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