LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
  Search this Thread
Old 11-14-2005, 08:53 AM   #1
space_invader64
Member
 
Registered: Aug 2005
Location: Oklahoma
Distribution: Suse 10
Posts: 70

Rep: Reputation: 15
permissions


I am running mandrake official 10.1. I would like my regular login to have access to everything. There is a lot of stuff that I don't get access to. How can I do that?
 
Old 11-14-2005, 09:21 AM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
Do you mean you want you regular user to have root privileges or do you just want to be able to read files?
 
Old 11-14-2005, 09:34 AM   #3
space_invader64
Member
 
Registered: Aug 2005
Location: Oklahoma
Distribution: Suse 10
Posts: 70

Original Poster
Rep: Reputation: 15
Yes I want the regular user to have root privileges.
 
Old 11-14-2005, 09:41 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
You need to switch to root using the su command from the terminal whilst logged in as a normal user. You can also use sudo to give yourself permissions to run certain commands normally accessible only as root. Its a big security risk to give a normal user all of roots privileges (look at what happens to Windows machines that run as administrator by default).
 
Old 11-14-2005, 09:49 AM   #5
prabuayyappan
Member
 
Registered: Sep 2005
Location: Coimbatore
Distribution: Prabuayyappan
Posts: 32

Rep: Reputation: 15
set the uid in
/etc/passwd as 0

for example
pp:x:508:508::/home/pp:/bin/bash ==> older one

change it to as follow
pp:x:0:0::/home/pp:/bin/bash
 
Old 11-14-2005, 09:52 AM   #6
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
As reddazz said, it is dangerous to. I would suggest using the su command. But, if you want to do it, prabuayyappan example will get you there.
 
Old 11-14-2005, 01:32 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,158

Rep: Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205
Sooner or sooner, you will sorely regret that decision.

You see, sooner or sooner, some little flea-bag Java script or somesuch is going to wander through, hidden on some web-page somewhere, and it will find all of the doors and windows of your computer system completely unlocked. And it will move in. Maybe it will just trash the place and get it over with, but more likely it will hide. And the person who placed it there will now have unlimited use of your computer. And bad things will happen.

No, you do not want your "regular login" to have unrestricted use of "your" computer. You want your regular login to be, in every way, "Just An Ordinary Joe." You want the users on the machine to be as un-privileged as possible. Why? For the same reason that you want to keep the safety on a gun turned on.

I can't help the fact that Microsoft continues to ship Windows boxes to unsuspecting customers with all login-passwords turned "off" and full Administrative rights. In the olden days when no one connected to the Internet that might have been "marginally okay," but in today's environment when everyone is connected to the Internet, constantly and at high speed, it is not. Those security features are there for your protection. Use them.

Quote:
Hacker in Outer Mongolia: "Computer, translate every file in the /home directory to EBCDIC."
Your computer: "Yes, m'lord." "It is done, m'lord."
HIOM: "Now transmit all the buisness records to that nice man in Zimbabwe who has won billions of dollars in the Zimbabwe Lottery, so that he can send a fortune to us."
YC: "Yes, master." "It is done."
HIOM: "Now format the hard drive and set the CPU temperature to 'broil.'"
YC: "Yes, master." "It w..." (bzzzzt....)
If you foolishly turn your security off, then your computer will obey without question anything that you, or anyone else who can reach your machine from anywhere in the world, may ask it to do. And, like I said, you will sorely regret that.
 
Old 01-07-2006, 04:17 AM   #8
Hallowedpoint
LQ Newbie
 
Registered: Nov 2005
Distribution: OpenSuSE 10.0
Posts: 11

Rep: Reputation: 0
same problem

I have the same annoyances as space invader, but I don't want to give my normal login root privilages. I'm having trouble changing privilages for files. Let me explain: I have a second internal HD in my computer that is only used for storing my mp3 files that I've ripped from my cd's. My wife's mp3's are also stored there so as not to take up room on her laptop, and I've networked the drive so she can access them. But I can't give her permission to change any of the information (like the ID3v2 tags) for the files, and I can't change them from my normal login (it says that they are read only in both instances). So I log in as root, and change the permissions using right-click>properties and set it change for all subfolders as well. That doesn't work... they immediately change back to just read and execute. So I went into the terminal and used chmod to change them again... and again, it doesn't work. Is there any way for me to set the permissions for the entire second harddrive to rwx for everyone (since there's nothing but music on it) so my wife can change her tags and I won't have to log in as root to do it? thanks...
 
Old 01-07-2006, 12:45 PM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by space_invader64
Yes I want the regular user to have root privileges.
REALLY REALLY REALLY BAD IDEA---DANGER DANGER

How much effort is it to type "su" plus a password??

Linux has enormous power and flexibility at the command line---that translates unfortunately to the power to screw things up. Why do you want to try going thru you daily routine while juggling a running chainsaw?
 
Old 01-07-2006, 01:51 PM   #10
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
Quote:
Originally Posted by Hallowedpoint
I have the same annoyances as space invader, but I don't want to give my normal login root privilages. I'm having trouble changing privilages for files. Let me explain: I have a second internal HD in my computer that is only used for storing my mp3 files that I've ripped from my cd's. My wife's mp3's are also stored there so as not to take up room on her laptop, and I've networked the drive so she can access them. But I can't give her permission to change any of the information (like the ID3v2 tags) for the files, and I can't change them from my normal login (it says that they are read only in both instances). So I log in as root, and change the permissions using right-click>properties and set it change for all subfolders as well. That doesn't work... they immediately change back to just read and execute. So I went into the terminal and used chmod to change them again... and again, it doesn't work. Is there any way for me to set the permissions for the entire second harddrive to rwx for everyone (since there's nothing but music on it) so my wife can change her tags and I won't have to log in as root to do it? thanks...
if you're sharing over nfs and you're sure you really want to do that, chmod the entire directory and contents to 777:

# chmod 777 <dir> -R

it would be better to make a group (mp3, for example) and put your wife and you in the group. then chown the directory and files to either you or your wife and the group, and then give write permissions to the group, something like this:

# groupadd mp3
[add user names to newly made mp3 group in /etc/group]
# chown user:mp3 <dir> -R
# chmod 775 <dir> -R

if you're sharing over samba, the above alone *might* work, but i think it could also depend on other variables in your smb.conf file. in that case, you'd want to post the samba info and more specific information about the directories with the mp3s, i.e., owner, group, drwxrwxrwx info, etc. it just makes it easier to see what's going on when the info is more specific.
 
Old 01-07-2006, 06:51 PM   #11
Hallowedpoint
LQ Newbie
 
Registered: Nov 2005
Distribution: OpenSuSE 10.0
Posts: 11

Rep: Reputation: 0
I've tried chmod on the directory, both chmod 777 and chmod a+rwx, and it just didn't work for some reason. In terminal, it went to the next line after I ran the command exactly as it would it it had changed the permissions, but I viewed them, and they still didn't allow write access. Does the -R have a major significance? I don't know what that means, because it wasn't in the little tutorial of bash commands that I found and have been using to teach myself. Being an almost total n00b to the OS, I'm still trying to figure out how to do what I want/need to do. Where would I find the Samba info to post it? This might also lead to a solution to a networking problem I posted about in another thread (I can't see any shared files that are on my wife's XP laptop or the other XP machine we have running, even tho the music files can be viewed/played on both computers). If I can figure out where to find things and how to edit stuff in the shell better on Linux then I probably won't have nearly as many difficulties.
 
Old 01-07-2006, 07:15 PM   #12
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
Try typing `man chmod` without the quotes. The -R means recursive so that everything below the target also gets the permissions applied. Since the pitfalls of no security have already been pointed out...

Are you using this command on a writable file system? If you type `mount` and look for the top level of the filesystem you're working in does it say rw? For example, if you're working in /usr/somedir is there a line in the mount output for /usr that says rw? If it says ro that will prevent the changes. Here are a couple of my mount outputs:

Changes can be made under this directory:
Code:
/dev/hda7 on /var type ext3 (rw)
Changes can't be made under this directory:
Code:
/dev/hda5 on /boot type ext3 (ro)
 
Old 01-07-2006, 10:17 PM   #13
Hallowedpoint
LQ Newbie
 
Registered: Nov 2005
Distribution: OpenSuSE 10.0
Posts: 11

Rep: Reputation: 0
OK, recursive... makes more sense now, thanks!! =) I typed mount, and for the harddrive I'm trying to work with (which isn't the one any system files are on, only music) I get: "/dev/hdb1 on /windows/D type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true)". I understand the part that it's writable thanks to gilead, but am clueless as to the rest of the message. Here's what shows up for the harddrive that my system files and everything else are on, for comparison: "/dev/hda2 on / type reiserfs (rw,acl,user_xattr)".

Last edited by Hallowedpoint; 01-07-2006 at 11:23 PM.
 
Old 01-07-2006, 11:25 PM   #14
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
It's the vfat file system that's causing the problem. vfat doesn't store file permissions the way the the Linux files ystems do. You've mounted it with a gid of 100 - are you both in the group that gid 100 corresponds to? In other words, if you run:

Code:
grep ':100:' /etc/group
are both of your usernames returned in the output?
 
Old 01-08-2006, 02:07 AM   #15
Hallowedpoint
LQ Newbie
 
Registered: Nov 2005
Distribution: OpenSuSE 10.0
Posts: 11

Rep: Reputation: 0
I ran exactly what you said and this was the output: "users:x:100:" My wife doesn't have a username because she doesn't use this computer. She uses her laptop that runs XP (which puts her in the group 'nobody' through Samba, I believe). And I don't recall mounting it myself... I think it might have been done sutomatically by Linux when I installed?? Not sure. But, it didn't even return my username for it... unless I was supposed to put somthing else in place of '/etc/group'?? Is there any way to change the file system without reformatting the harddrive? Or will I have to move everything out of it, reformat it, and move everything back in? This would be simple for me to do since I have another internal harddrive if that would be the easiest thing. If that's the case, how would I go about reformatting it? And one last pointless question: Is the vfat file system a result of where this used to be a windows machine and I didn't touch the second HD when I switched to linux?

Last edited by Hallowedpoint; 01-08-2006 at 02:12 AM.
 
  


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
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 01:00 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 05:16 AM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 01:52 PM
permissions JROCK1980 Linux - Software 6 04-09-2004 05:03 AM
need help with permissions hbbtstar Linux - Newbie 4 10-13-2003 07:02 AM


All times are GMT -5. The time now is 01:19 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration