LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Closed Thread
  Search this Thread
Old 01-07-2013, 09:07 PM   #1
FirstStepInLX
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Rep: Reputation: Disabled
Add directory by the root to a new user (script)


I'm working on a script which create users automatically with some parameters. So i would like to ask how can i create repertories in the home directory of the new user

+ the script is used with sudo
# ./sudo name_script

My syntax is:

# after the creation of the new_user i tried this syntax:

mkdir new_directory

# when i check if the new_directory has been created
# i find it in the current user not in the new_user.

#I also tried this syntax,but the new_directory doesn't exist too.
#I supposed that now i'm in the new_user

su -l new_user

mkdir new_directory

#The creation of users woks good.

Best regards.
 
Old 01-08-2013, 12:20 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate of http://www.linuxquestions.org/questi...pt-4175444594/.
 
  


Closed 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

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add user in vsftpd with specified home directory a4kata Linux - Newbie 1 02-21-2011 01:27 PM
Add User Permission to Directory anjanesh Linux - Newbie 3 12-29-2007 10:28 AM
samba - add user script - User account does not exist itzamecwp Linux - Server 2 01-18-2007 10:52 PM
Linux - How to add a new user with the same root/super-user's privileges? asgarcymed Linux - General 8 12-23-2006 07:45 PM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration