Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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).
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.
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...
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?
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.
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.
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:
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 10:23 PM.
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?
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 01:12 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.