chmod command in SunOS


 
Thread Tools Search this Thread
Operating Systems Solaris chmod command in SunOS
# 1  
Old 03-01-2012
chmod command in SunOS

Hi Bros,

I have a question want to receive your help.

On SunOS server. I have 1 file in /etc. mode of file is "read only". I've used chmod 777 commmand to change mode of that file. firstly, it's ok. but about 3 mins after that. The mode of that file rollback to "read only". I don't know how. please help me to fix that.
Thank you very much!
# 2  
Old 03-01-2012
which file is it?
# 3  
Old 03-01-2012
That is "passwd" file. I want to change mode shell of 1 user in this file. dir: /etc/passwd
# 4  
Old 03-01-2012
Hi,

Use the command "usermod -s /new/shellname username", that's the correct way of doing this.

Dave
# 5  
Old 03-01-2012
Quote:
Originally Posted by hikaru022002
That is "passwd" file. I want to change mode shell of 1 user in this file. dir: /etc/passwd
The /etc/password file should stay read-only. There is no point changing this permission as the only user allowed to modify /etc/password is root and read-only restrictions are not enforced against root.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use chmod command inside ftp block?

hi, i want to use chmod command inside ftp. so that what ever files are transfered to the local server will hav 664 permission. if i use chmod inside ftp , the file permissions gets changed in the remote server and when the file is transffered to local server using get command, it does not... (8 Replies)
Discussion started by: Little
8 Replies

2. UNIX for Dummies Questions & Answers

Du -sk command in SunOS 5.10

Hi, I am little confuse after using du -sk on file . I have file listing like: -rw-r--r-- 1 Xuser Ygrp 51419029531 Sep 21 07:40 catalina.out when i issue cmd : du -sk catalina.out gives output as 1804511 catalina.out This means 1804511 KB. Which means 1 GB. ... (3 Replies)
Discussion started by: krsnadasa
3 Replies

3. Shell Programming and Scripting

One doubt regarding chmod command

which one is correct chmod 777 file.txt or chmod 777 / file.txt what is difference in these two commands? thanx in advance (2 Replies)
Discussion started by: Himanshu_soni
2 Replies

4. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

5. UNIX for Dummies Questions & Answers

Tar Command in SunOS 5.6

Hi, I have to backup the contents of an old SunOS to tape. The tape drive is being recognized by the operating system. However, the man pages for tar are a little different from the ones I have seen using Red Hat/Centos. On Centos to backup the entire contents of the / partition I could just... (1 Reply)
Discussion started by: mojoman
1 Replies

6. Solaris

usleep command is not available in SunOS

Hi All, I need usleep command to use in one of my shell script. I am working on SunOS 5.9. Where usleep command is not available. Is there any way to use usleep command in SunOS. Thanks In Advance, chidhu (5 Replies)
Discussion started by: pa.chidhambaram
5 Replies

7. Solaris

chmod command

Hi, I want to create one user who has right to run chmod command in solaris, Any Idea? (7 Replies)
Discussion started by: manoj.solaris
7 Replies

8. UNIX for Dummies Questions & Answers

Required help in chmod command

I have files inside the some directories. The no. of files in each directory will vary from 1 to 500K. I need to change the permissions of all the files to 400 mode. When the files are large in numbers...the command $chmod 400 * fails saying "ksh: /bin/chmod: arg list too long" so I have... (5 Replies)
Discussion started by: lokachari
5 Replies

9. Shell Programming and Scripting

change file type to hidden using chmod command

I want to make a hidden file with chmod command. Example: I have a file name inputfile.txt -rw-r--r-- 1 xxxxxx xxxxxx 1388 Sep 12 05:41 inputfile.txt I want to hide that file using chmod command. Please tell me if it is possible or there is some other way to do this. Thanks... (2 Replies)
Discussion started by: rinku
2 Replies

10. UNIX for Dummies Questions & Answers

chmod command for recently modified files

hello! is there a way for me to use the chmod command to change permissions for several files all at once -based on the fact that these files were all most recently modified TODAY ? I can't use a wildcard on their filenames because the filenames are varied. But I was hoping I could somehow do... (2 Replies)
Discussion started by: polka_friend
2 Replies
Login or Register to Ask a Question