LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 07-08-2007, 02:45 PM   #1
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu 12.04LTS
Posts: 257

Rep: Reputation: 31
increase permission by command line


Hi,
Is there an easy way to increase permissions via the command line?
I keep bumping into permissions problems and it is a real killer.
I run a simple desktop with suse 10.2 and one user, (me).
I can't seem to be able to log into yast as the user. My password (root's) is rejected with the following err msg. /sbin/yast2
kde su "incorrect password, try again".
this makes no sense, since if I call up bin/bash and request a root terminal I use the same psw and have no trouble.
Or, is there an error perhaps in the kde su program?
My guess is that it is probably me.
Matt.
 
Old 07-08-2007, 03:55 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
I'm not sure what "kde su" is all about, is this what you type to switch user? Normally you only need to open a terminal and type "su' then give the root password. Because KDE is a desktop manager, which gives the impression you're not working in run level 1 or 3 without X.
Below is a little information on permission changes, I also am the only one that touches my computer, so I usually change permissions to full access by all (owner, group, others) with a command similar to this without the quotes: 'chmod 777 /path/to/filename. If I want to change permissions to all files and possibly all sub-directories in a directory I use: 'chmod -R 777 /directory_name' this second example I do not include the path to the directory if I'm in the parent directory.
Some times it is necessary to change owner for a user to have access, my user name is 'jo', when I created a new partition to contain files for vmware operating systems, I made a directory /vm to access it, vmware complained it could not write to the new partition, changing permission was not adequate, so I had to change owner to the user from root recursively for the partition with this: 'chown -R jo:jo /vm' for my user to store his virtual machines in the new partition. In the example of the result of typing 'ls -l' for a file to see it's attributes below, 'name name' is the owner of the jpg file.

Quote:
There is permission set for the Owner, Group and Others. When you type " ll " you will get 10 set of values for each files eg: -rw-rw-r-- 1 name name 41333 Aug 18 22:57 jpg . The 1st bit denotes if its a directory or file. 2nd, 3rd and 4th bit is the owner's permission. 5th, 6th and 7th bit is group's permission and 8th, 9th and 10th bit is for other's permission. According to the example owner and group has read/write permission and other's have only read permission.
You can change the permission of a file. Try chmod 777 filename. This will give owner, group and other's full permission (read/write/execute) over the file.



Permission Sets:-

1 - Execute
2 - Write
3- Write and Execute
4- Read
5- Read and Execute
6 - Read and Write
7 - Read, Write and Execute

Try chmod 700 filename. This will give the owner of the file full permission. The Group and other's will have no permission to access the file. Only the owner of the file can read, write or execute the file. If you want other and Group only to read the file you can give chmod 744 filename.
 
Old 07-09-2007, 06:47 AM   #3
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu 12.04LTS
Posts: 257

Original Poster
Rep: Reputation: 31
Many thanks for your reply. I'll have to tool around with it a bit more. Thought I'd clear up the Kde thing.
I use the KDE desktop and the GUI for just about everything. When I click on the Yast icon, I get a small Msg. window whose title bar is: Run as root-KDE su
the main body says: Please enter the Administrator (root) password to continue.

Command /sbin/yast2

Password (followed by a small window for the entry)

When I then enter root's Password, it is rejected and another small window opens:
Title bar: Sorry -KDE su

"incorrect password, please try again"

The psw is correct and will get me a # shell and is not rejected.
BTW, I love this sight! I am trying to disprove an old adage that "you can't teach an old dog new tricks"
matthew
 
Old 07-09-2007, 10:10 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Just a security tip: 777 or full access permissions to everyone is usually a bad idea. Same goes for giving the "root" user ownership of files/dirs.

I've already read about a similar issue with kdesu (a special "su"-like tool for temporarily switching to root user in KDE) in some SuSe distros. You may want to start searching this forum or Google for details.

Anyway, just start a terminal, switch to root and then start up /sbin/yast2. This bypasses the "kdesu" app and should start yast2 as root. Alternatively, you can use "sudo" to give your specific user direct access to the /sbin/yast2 program.
 
Old 07-09-2007, 03:41 PM   #5
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
is KDE su setup similar to sudo ? so when it prompts for a password it wants your USER password not the root password ?
 
Old 07-09-2007, 04:18 PM   #6
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu 12.04LTS
Posts: 257

Original Poster
Rep: Reputation: 31
Lightbulb kde su error

Well,
Your comments were spot on.
Suse 10.2 had considered switching from su to sudo or vice versa for certain apps. and apparently kde jumped the gun. As a result there is a kderc file but no kdesurc file which is still necessary.

The answer is to:

Login as root (su in a terminal on the user desktop will not do)

cd to .kde/share/config

Create the file kdesurc

add these two lines of code:

Code:
[super-user-command]
super-user-command = su
write and save the file.

This worked fine for me.
Thanks everybody for your help!
Matthew
 
  


Reply

Tags
increase, permissions


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to increase command line Arguments Size in UNIX/LINUX??? sunilvadranapu General 10 03-31-2009 11:47 AM
increase command line screen resolution sunpascal Linux - Newbie 4 02-09-2006 12:35 PM
Increase the command line buffer size Akiles Linux - General 3 04-19-2005 11:17 AM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
Mounting via CD icon works, but via command line = permission denied nmoog Linux - Newbie 6 03-07-2004 02:26 AM


All times are GMT -5. The time now is 04:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration