LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-17-2005, 11:02 AM   #1
sharmashikha
Member
 
Registered: Jun 2005
Location: india
Distribution: fedora core2
Posts: 34

Rep: Reputation: 15
problem with user accounts


My lfs has become bootable.i have written bash_profile,bashrc and a few more files.

I created a user using the useradd –m command.

When I logged in as user and tried to make a file using the vi editor it would not get saved.it showed the error-:

E212: Can’t open file for writing.

Even the touch command does not work.

It shows the error-:
Touch: cannot touch “filename” ; Permission denied.

How can I remove this error.
 
Old 07-17-2005, 11:05 AM   #2
zonk
Newbie
 
Registered: Jul 2005
Posts: 7

Rep: Reputation: 0
well. what file are you trying to edit? it's quite expected that a normal user should not be able to edit any given file, or even be able to create new files in some directories. you can either change permissions on the files using chown and chgrp if that's what you want. if those are configuration files or other files that really should not be open to the public, you may rather wish to use either su or sudo to change to a user that has the necessary rights to edit the files. that is much more secure.
 
Old 07-17-2005, 11:23 AM   #3
sharmashikha
Member
 
Registered: Jun 2005
Location: india
Distribution: fedora core2
Posts: 34

Original Poster
Rep: Reputation: 15
I am not editing any file .I am trying to create a new file in the home directory of the user. The user should be able to create files in his own home directory but that is not happening.

The kind of errors i mentioned earlier are coming.
 
Old 07-17-2005, 11:59 AM   #4
zonk
Newbie
 
Registered: Jul 2005
Posts: 7

Rep: Reputation: 0
post the output of

Code:
ls -la /home
whoami 
pwd
please. executed in the directory you want to create the file in.
 
Old 07-17-2005, 11:35 PM   #5
sharmashikha
Member
 
Registered: Jun 2005
Location: india
Distribution: fedora core2
Posts: 34

Original Poster
Rep: Reputation: 15
output of the commands

ls -al /home

drwxr-xr-x 4 root root 4096 .
drwxr-xr-x 22 root root 4096 ..
drwxr-xr-x 2 1005 100 4096 shikha


output of
whoami:- shikha

pwd:- /home/shikha
 
Old 07-18-2005, 12:56 AM   #6
sharmashikha
Member
 
Registered: Jun 2005
Location: india
Distribution: fedora core2
Posts: 34

Original Poster
Rep: Reputation: 15
thanks a lot its done now.vimrc was not present in the home directory of users.now i've placed vimrc in /etc/skel.n its working fine
 
Old 07-18-2005, 07:57 AM   #7
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
One thing I'm finding interesting is that it's showing the uid 1005 instead of your username in the permissions. Do a "chown shikha:users /home/shikha" as root.
 
Old 07-20-2005, 05:40 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,706
Blog Entries: 4

Rep: Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949
1005 was probably the userid of your "lfs" user that you used when building the system up to this point.

If a user having this id-number does not exist in the password file of your rebooted, lfs system, then it will show up as a number rather than a name.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
User Accounts Cool_Hand_Luke Linux - Newbie 6 08-24-2005 08:35 PM
user accounts metallica1973 Linux - Security 2 06-19-2005 05:35 PM
User Accounts Kemik Linux - Newbie 13 01-12-2005 04:24 PM
User Accounts kaplan71 Linux - General 1 07-08-2004 01:19 PM
User Accounts petey *BSD 4 09-26-2002 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:34 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